git push heroku master失败,解析错误-哪个文件? [英] git push heroku master fails with parse error - which file?
本文介绍了git push heroku master失败,解析错误-哪个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我执行git push heroku master时出现解析错误. Heroku告诉我哪个行和列导致解析错误,但不是哪个文件.我如何找出heroku解析哪个文件?请告知.
I'm getting a parse error when I do a git push heroku master. Heroku tells me which line and column is causing the parse error, but not which file. How do I find out which file heroku is having trouble parsing? Please advise.
----- package.json -----
{
"name": "mean",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node server.js"
},
"dependencies": {
"mongoose": "3.8.7",
"express": "3.4.8",
"jade": "*",
"stylus": "*"
},
"engines": {
"node": "0.10.x",
"npm": "1.4.x"
}
}
----- output -----
[23:46 56] git push heroku master
Initializing repository, done.
Counting objects: 259, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (242/242), done.
Writing objects: 100% (259/259), 927.54 KiB | 550.00 KiB/s, done.
Total 259 (delta 13), reused 0 (delta 0)
-----> Node.js app detected
parse error: Expected separator between values at line 13, column 16
! Push rejected, failed to compile Node.js app
To git@heroku.com:mighty-mountain-5447.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:mighty-mountain-5447.git'
推荐答案
我也遇到了,这是我在.json
文件中错过的逗号.
Happened to me too, it was the comma I missed in the .json
file.
您可能没有立即将逗号放在第13行中,而您提交了
You probably didn't put that comma in line 13 right away, and you commited
},
再次提交,然后推送到Heroku.
Commit again and then push to Heroku.
这篇关于git push heroku master失败,解析错误-哪个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文