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 [email protected]:mighty-mountain-5447.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:mighty-mountain-5447.git'
Reason: It maybe that your github default branch is main and not master or vice versa. So to solve this problem you will have to use your actual github default branch. In my case, I got the error because my github default branch isn't master but main .
Happened to me too, it was the comma I missed in the .json
file.
You probably didn't put that comma in line 13 right away, and you commited
},
Commit again and then push to Heroku.
I just got the same exact error. In my case the problem was in the package.json
file because I missed the comma after I manually added "engines" to it:
{
"engines": {
"node": "0.10.x"
}, <-- missed this comma here
"name": "heroku",...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With