简体   繁体   English

Strapi + Heroku 部署失败:npm ERR! 代码 EINVALIDTAGNAME

[英]Strapi + Heroku deployment failed:npm ERR! code EINVALIDTAGNAME

Goal:目标:

To have my strapi server deployed to heroku, so I can have a headless CMS.将我的 Strapi 服务器部署到 heroku,这样我就可以拥有一个无头 CMS。

Error:错误:

remote: -----> Installing dependencies
remote:        Installing node modules (package.json + package-lock)
remote:        npm ERR! code EINVALIDTAGNAME
remote:        npm ERR! Invalid tag name "^cd s": Tags may not have any characters that encodeURIComponent encodes.
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.1tJNV/_logs/2019-11-19T14_12_00_784Z-debug.log
remote: 
remote: -----> Build failed

System:系统:

  • Node.js version: 12.13.0 Node.js 版本:12.13.0
  • NPM version: 6.12.0 NPM 版本:6.12.0
  • Strapi version: 3.0.0-beta.17.4 Strapi 版本:3.0.0-beta.17.4
  • Database: MongoDB atlas cloud数据库:MongoDB 图集云
  • Operating system: LinuxMint 19.2 Cinnamon操作系统:LinuxMint 19.2 Cinnamon
  • Front-end: React 16.11.0前端:React 16.11.0

I have tried:我努力了:

Strapi heroku deployment guide Strapi heroku 部署指南

Heroku trouble shooting Heroku故障排除

Question:问题:

Now I ran out of trials to experiment with...what can I do?现在我的试验用完了……我能做什么?

For some reason, heroku has git conflict with my server folder which is inside my react project folder.出于某种原因,heroku 与我的反应项目文件夹中的服务器文件夹有 git 冲突。 I moved my strapi server folder outside and git init and deployed again, this time it works.我将我的strapi服务器文件夹移到外面,git init 并再次部署,这次它可以工作了。

UPDATE: I also found the error, it was in my react package.json file in the dependencies for strapi.更新:我还发现了错误,它在我的反应 package.json 文件中的依赖项中。 I have no idea how that ended up there!我不知道那是怎么结束的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Heroku部署失败(npm java) - Failed deployment with Heroku (npm java) 在 Heroku 上部署 Mern Stack 应用程序(远程:npm ERR。在 server@1.0.0 heroku-postbuild 脚本中失败。) - Mern Stack Application Deployment on Heroku (remote: npm ERR! Failed at the server@1.0.0 heroku-postbuild script.) Mac 上的 Node.js Heroku 部署 - sh: 1: nodemon: not found / npm ERR! `nodemon fileName.js` / npm ERR! 在...启动脚本失败 - Node.js Heroku Deployment on Mac - sh: 1: nodemon: not found / npm ERR! `nodemon fileName.js` / npm ERR! Failed at the...start script 如何修复 npm 错误! 代码 ELIFECYCLE (heroku) - how to fix npm ERR! code ELIFECYCLE (heroku) npm 审计 EINVALIDTAGNAME - npm audit EINVALIDTAGNAME Npm ERR 代码 EJSONPARSE - 无法解析 json - Npm ERR code EJSONPARSE - Failed to parse json npm ERR:gyp ERR:堆栈错误:`make`失败,退出代码:2 - npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 Node js 应用程序的 Azure 部署失败:npm ERR! 代码 EPERM - Azure deployment fails for Node js application : npm ERR! code EPERM Strapi Heroku 部署无法连接到 MongoDB - Strapi Heroku deployment fails to connect to MongoDB 无法部署到Heroku:npm ERR! 错误:找不到版本:1.1.49:npm / 1.1.49 - Failed to Deploy to Heroku: npm ERR! Error: version not found: 1.1.49 : npm/1.1.49
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM