【发布时间】:2014-03-24 19:58:25
【问题描述】:
我在执行 git push heroku master 时遇到解析错误。 Heroku 告诉我哪一行和哪一列导致了解析错误,但不告诉我是哪个文件。如何找出 heroku 无法解析的文件?请指教。
----- 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'
【问题讨论】:
-
在提交前运行jshint(最好使用咕噜声)。它应该告诉你是否有什么需要用你的 js 修复。
-
我正在使用 jshint。看起来不错。这就是为什么这如此令人费解。我希望他们能说出它遇到问题的文件。