Error installing NPM using package.json

My versions of node and npm are the latest. But getting an error and the lack of a folder with an expression fall under. / node_modules. The express folder fits under /home/vagrant/.npm npm-debug.log is created. Not sure how to attach it.

npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/home/vagrant/.nvm/versions/node/v4.2.2/bin/node" "/home/vagrant/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
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' -> '/vagrant/testProject/node_modules/express/node_modules/send/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! Linux 3.13.0-68-generic
npm ERR! argv "/home/vagrant/.nvm/versions/node/v4.2.2/bin/node" "/home/vagrant/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
npm ERR! path npm-debug.log.f7bc0249588f17bea044ac621dd74bb9
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
+2
source share
2 answers

You need to run npm with the option -–no-bin-linkto tell npm that your file system does not support links

If you want to make --no-bin-linknpm for each command, you can add an alias to your .bashrcfile in your home directory using this command:

echo "alias npm='npm --no-bin-links'" >> /home/vagrant/.bashrc

Another option is to configure your configuration to allow symbolic links on Windows hosts in your Vagrantfile

config.vm.provider "virtualbox" do |v|
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
end

. https://github.com/npm/npm/issues/7308

+3

npm, ,

npm config set bin-links false

: npm GH-7308

+2

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


All Articles