Npm not working with node v0.8.5?

I am deploying a Node application to Heroku and getting the following error. If npm does not work with the latest versions of Node, what should we use for package manager? I really liked node_modules and package.json. It seemed very logical.

-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
       Using Node.js version: 0.8.5
       Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
       Error: npm doesn't work with node v0.8.5
       Required: node@0.4 || 0.5 || 0.6
+5
source share
2 answers

If you specify Node.js 0.8.xthrough "engines"in package.json, you may also need to install a version for "npm":

{
  ...
  "engines": {
    "node": "0.8.x",
    "npm":  "1.1.x"
  }
}

From Heroku Dev Center for Node.js :

If you do not specify a version, you will receive the following default values:

  • Node.js: 0.4.7
  • npm: 1.0.106

This page also contains links to supported version manifestations for both.

+11
source

npm: - 1.1.45 node 0.8.x.

0

All Articles