npm install
is pretty straight forward command. The Node Package Manager goes straight to the repository fetches the dependencies from the list in package.json and installs under node_modules directory. But the this specific error is a head-breaker. This can be seen only under specific conditions.
If you are using a ‘Vagrant’ machine on any host, let it be Windows or Mac you still have this error. The solution is an easy one here. just add --no-bin-links
to the npm command.
npm install --no-bin-links
Vola! its is done.
Below, I am attaching a sample error for your reference (some info removed.. you get the point..).
$ npm install npm ERR! Linux 4.4.0-45-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! path ../mime/cli.js npm ERR! code EPROTO npm ERR! errno -71 npm ERR! syscall symlink npm ERR! EPROTO: protocol error, symlink '../mime/cli.js' -> '/var/www/bestdressed-app/node_modules/.bin/mime' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /var/www/bestdressed-app/npm-debug.log