It was not possible to deploy to the hero, because the npm version is not the latest

looks like heroku uses npm version 1.0.94

I have a dependency that requires node 0.6.x, but npm 1.0.94 is "based" on node 0.4.7

is there any solution to solve this problem.

Installing dependencies with npm 1.0.94 npm ERR! Unsupported npm ERR! Not compatible with your version of node/npm: palette@0.0.1 npm ERR! Required: {"node":"0.6.x"} npm ERR! Actual: {"npm":"1.0.94","node":"0.4.7"} 
+4
source share
4 answers

You can create your own version of node for heroku using buildpacks.

and change the node version in https://github.com/heroku/heroku-buildpack-nodejs

also see http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/

+5
source

In the given example @ http://devcenter.heroku.com/articles/node-js

worked for me when I changed package.json to the following:

 { "name": "node-example", "version": "0.0.1", "dependencies": { "express": ">=2.2.0" } } 
+7
source

You can specify the version of node and npm in the package.json file.

https://devcenter.heroku.com/articles/nodejs-versions

Worked for me.

+2
source

I believe Heroku Cedar is not using the latest version of node.js yet!

"The necessary conditions

  • Basic knowledge of node.js, including the installed version of node.js and NPM.

  • Your application should run on node.js 0.4.7.

  • Your application should use NPM for dependency management.

(see Heroku Dev Center )

Thus, the problem is not only in the npm version, but also in the node.js version!

You should check if you really need the latest version of node, and if so, the only answer to using heroku is to wait for the update!

Yours faithfully!

0
source

Source: https://habr.com/ru/post/1388579/


All Articles