Heroku/Node.js – parse error: Expected separator between values

nodejsAs I go through setting up a Node.js app on Heroku, I encountered some really silly issues, so I figured I would share them with the web and hopefully help someone who runs into the same problem.  This one was a really stupid mistake on my part – I’m almost embarrassed to admit that I did this.  So going through the Getting Started with Node.js on Heroku guide, I got to the section on updating the package.json file to specify which version of node to use.  And here’s where I made my mistake.  My package.json looked like this:

{
  "name": "example-app",
  "version": "0.0.0",
  "description": "", 
  "main": "app.js",
  "scripts": {},  
  "author": "", 
  "license": "ISC",
  "dependencies": {
    "express": "^4.2.0"
  }
  "engines": {
    "node": "0.10.28"
  }
}

Can you see the mistake I made?  No? I forgot a comma when I added the “engines” key to the json object.  Well, I guess I should be clear that this was the first mistake I made.  After I fixed this, I figured everything should be fine and my app would run, so I ran the git push command:

macbook$ git push heroku master

Drum roll please… “parse error: Expected separator between values…” – wanh wanh… oh yeah, I forgot to commit my changes to package.json before trying to push.  And finally, success! My app was deployed.  Again, I hope this helps someone.  Good luck with your node app.