Reputation: 34627
I'm trying to push a commit to heroku but it's failing giving this error
Total 93 (delta 62), reused 0 (delta 0)
-----> Node.js app detected
parse error: Invalid numeric literal at line 31, column 7
! Push rejected, failed to compile Node.js app
To [email protected]:~.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:~.git'
Which file is it referring the error at line 31 is in?
The app is working fine locally.
Upvotes: 2
Views: 1112
Reputation: 15799
I ran into this problem as well. It turned out to be the editor I was using was encoding my quotes incorrectly. Changed to Sublime Text and issue resolved.
Upvotes: 2
Reputation: 1578
In my case it was package.json. It doesn't like comments in there, either...
I emptied out all the deps and dev-deps and pushed and it worked. Try that. (Obvs you'll have to put them back in).
Also be careful with the syntax for module versions like '*' and '^' - that was the first set of errors I got that generated the problem...
UPDATE: Ignore the last paragraph: the semver markers above are fine IF your version of node is >0.10 ...
Upvotes: 5