在设置heroku应用程序时遇到问题吗?

时间:2018-08-23 05:06:46

标签: reactjs heroku redux react-redux

我创建了一个Web应用程序,该应用程序使用诸如Node.js和React.js之类的技术。现在,我创建了它,现在我试图将该应用程序推送到Heroku,当它持续显示某些错误时,我尝试了许多不同的方法,但是它不起作用。错误日志如下所示:

Counting objects: 25717, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (16046/16046), done.
Writing objects: 100% (25717/25717), 26.05 MiB | 59.00 KiB/s, done.
Total 25717 (delta 8710), reused 25548 (delta 8617)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote: parse error: Expected another key-value pair at line 12, column 3
remote:  !     Unable to parse package.json
remote: 
remote: 
remote: -----> Build failed
remote: parse error: Expected another key-value pair at line 12, column 3
remote: parse error: Expected another key-value pair at line 12, column 3
remote: parse error: Expected another key-value pair at line 12, column 3
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:        
remote:        Love,
remote:        Heroku
remote:        
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to optioncapital.
remote: 
To https://git.heroku.com/optioncapital.git
 ! [remote rejected]   master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/optioncapital.git'

我不了解天气procfile,是否需要所有条件,但是我正在通过一个在线课程学习,那个人没有做任何类似的事情。...请告诉我如何解决此问题... < / p>

1 个答案:

答案 0 :(得分:1)

查看此错误: remote: parse error: Expected another key-value pair at line 12, column 3 remote: ! Unable to parse package.json

您似乎遇到package.json

的问题

=========================================

这样做

删除“ node_modules”文件夹

npm cache clean

npm update