I am trying to push my code to my heroku app, but whenever I run "git push heroku master" using the package.json below, it gives me errors. The errors are shown within the terminal dialogue linked below. Hopefully someone can help.
package.json:
{
"name": "learn-express-server",
"version": "0.0.1",
"dependencies": {
"express": "3.0.0",
"jade": "0.27.2",
"mongodb": "1.1.4",
"mongoose": "3.0.2"
},
"engines": {
"node": "0.8.4",
"npm": "1.1.49"
}
}
Terminal Response:
http://d.pr/n/czqT
Which version do you have installed on your local machine? Try npm ls express
Express doesn't have a version 3.0.0
yet, it's still a release candidate. Put your exact version in the package.json
, or write "latest"
, or use the git://
uri, or a range of versions. Or simply commit your express to version control. (It's acceptable style in node applications.)
http://www.mikealrogers.com/posts/nodemodules-in-git.html
But this isn’t Ruby or Python anymore, this is node.js, and we did modules much better. If you have an application, that you deploy, check in all your dependencies in to node_modules. If you use npm do deploy, only define bundleDependencies for those modules. If you have dependencies that need to be compiled you should still check in the code and just run $ npm rebuild on deploy.