I
I
idin2017-05-25 07:22:18
JavaScript
idin, 2017-05-25 07:22:18

Nodejs and Npm what's wrong with installing packages globally?

I want to install all sorts of different packages globally, but an error occurs

dasha-pc:~$ npm install -g  gulp-tinypng
npm WARN npm npm does not support Node.js v0.10.25
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'

same error when installing other packages
npm install -g gulp
npm install -g npm
version:
dasha-pc:~$ node -v v0.10.25
dasha-pc:~$ npm -v 4.6.1
and behold (( can't figure out how to fix it, Help, can anyone come across,
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Baev, 2017-05-25
@Izy

You have a very old version of Node.js, you need to update.

A
Alexey Ratnikov, 2018-03-15
@MySochi

A similar problem arose:
nodejs --version gives: v8.10.0
npm --version latest: 5.7.1
when trying to update Gulp: npm install [email protected]
gave this:

npm WARN npm npm does not support Node.js v5.7.1
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 Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! Buffer.alloc is not a function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question