user7234816
user7234816

Reputation:

Error while installing any NPM module

I am new to webDevelopment . I am trying to install a npm module using the npm install grunt-contrib-watch --save-dev , But I am getting this error -

npm WARN npm npm does not support Node.js v0.10.37
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! Object function (err) {
npm ERR!         if (err) return cb(err)
npm ERR!         fs.fsync(fd, function (err) {
npm ERR!           if (err) return cb(err)
npm ERR!           fs.close(fd, cb)
npm ERR!         })
npm ERR!       } has no method 'toLowerCase'

I tried to install the node latedt version then also, It is giving me the same .

My versions are -

Node - v0.10.37
npm  - 4.6.1

How can I solve this ?

Upvotes: 1

Views: 116

Answers (1)

Peter Grainger
Peter Grainger

Reputation: 5097

That version of npm you are using doesn't work well with the version of node you are using.

The supported version of npm would be 2.15.1 for that version of node.

I would suggest installing something like nvm https://github.com/creationix/nvm/blob/master/README.md which will handling installation of compatible versions for you.

You can use any version of node you like using nvm use 10.0.10 and it will use version 10.0.10 of node and 2.15.1 of npm.

Upvotes: 1

Related Questions