Fasna February 2016

Error on npm install

I'm trying to install npm packages via terminal and getting the folowing errors. Tried all solutions at npm github, but none of them are working.

Removed node_modules and ran

npm install

again, but still the errors are there.

npm ERR! Error: ENOENT, open
    '/var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/simulator
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! EEXIST, mkdir '/var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js'
File exists: /var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js
Move it away, and try again.

npm ERR! System Linux 3.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/simulator
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js
npm ERR! fstream_path /var/www/simulator/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.2.tgz
npm ERR! Error: UNKNOWN, symlink '../mim        

Answers


suzumakes February 2016

Can you clear the cache and try again?

npm cache clean


Fawzan February 2016

This happens because your host is windows & guest is linux. If both of them are *nix based then you will not get the issue.

There are two options to sort this out.

1.npm config set bin-links false (But this will prevent you from being able to use npm install -g to install global binaries.)

2.npm install --no-bin-links (Looks like you have figured it out for yourself. I recommend this method as well)

Post Status

Asked in February 2016
Viewed 3,577 times
Voted 10
Answered 2 times

Search




Leave an answer