node.js - 宅基地上的 Npm

标签 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

我猜“packages.json”可能没问题,但问题可能是由 npm 引起的。

有什么想法吗?

最佳答案

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

npm install -g npm@latest

关于node.js - 宅基地上的 Npm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30395488/

相关文章:

node.js - ES6 方法得到一个空值 "this"并且类变量不可访问

node.js - 尝试结束 Express js 路由中的代码执行

php - 覆盖created_at值

php - Laravel 5.2 curl_init() 抛出错误 "Call to undefined function"

php - Laravel 5.x 表单最佳实践

json - 是否有提供 JSON 记录的关系数据库?

node.js - 如何在 win32-api Node 模块中使用带有 EnumWindows 的自定义结构

node.js - 通过 crontab 执行 NodeJS 会抛出错误

javascript - 连接 create-react-app reactJs 和 mysql

javascript - 我应该在 npm 分发中包含我的项目源文件吗?