Npm on Homestead

Tos*_*shi 9 node.js npm laravel-5 homestead

我刚用宅基地做了laravel5环境.我做了"npm install",并得到了以下错误.

vagrant@homestead:~/Code/casts$ npm install

> node-sass@3.1.2 install /home/vagrant/Code/casts/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/vagrant/Code/casts/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node

> node-sass@3.1.2 postinstall /home/vagrant/Code/casts/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

` /home/vagrant/Code/casts/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
npm ERR! EEXIST, open '/home/vagrant/.npm/9fb4c098-adable-stream-1-0-33-package-tgz.lock'
File exists: /home/vagrant/.npm/9fb4c098-adable-stream-1-0-33-package-tgz.lock
Move it away, and try again.

npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant/Code/casts
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/vagrant/.npm/9fb4c098-adable-stream-1-0-33-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0
Run Code Online (Sandbox Code Playgroud)

我猜"packages.json"可能没问题,但问题可能是由npm造成的.

有任何想法吗?

Max*_*nin 16

最近有同样的问题,通过更新npm修复:

npm install -g npm@latest
Run Code Online (Sandbox Code Playgroud)


Mik*_*e F 6

尝试sudo npm install改为做.

如果node-sass不起作用,你总是可以将其换成其他东西,我相信它们都会导出一个sass()方法.