提问者:小点点

Strapi+Heroku部署失败:NPM错误!代码EINVALIDTAGNAME


目标:

将我的strapi服务器部署到heroku,这样我就可以有一个无头的CMS。

错误:

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

系统:

  • node.js版本:12.13.0
  • NPM版本:6.12.0
  • strapi版本:3.0.0-beta.17.4
  • 数据库:MongoDB atlas Cloud
  • 操作系统:LinuxMint 19.2 Cinnamon
  • 前端:React 16.11.0

我试过:

Strapi heroku部署指南

Heroku故障排除

问题:

现在我的试验用完了...我能做什么?


共1个答案

匿名用户

由于某种原因,heroku与react项目文件夹中的服务器文件夹发生了git冲突。我将我的strapi服务器文件夹移到外面,并重新部署了git init,这一次它起作用了。

更新:我也发现了错误,它在Strapi的依赖项中的react Package.json文件中。我不知道它怎么会落在那里!