我得到了所有这些错误。我正在使用sudo npm install -g strongloop,还尝试了sudo npm --unsafe-perm install -strongloop,但仍然收到以下错误。
顺便说一下,这是在AWS服务器上。它在我的Mac上安装得很好,但好像权限有问题,或者它与Ubuntu不兼容,不确定。
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/strongloop/node_modules/strong-arc/node_modules/strong-pm/node_modules/strong-service-install/node_modules/strong-service-upstart/node_modules/lodash/internal/baseMergeDeep.js'
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-48-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "-g" "--unsafe-perm" "install" "strongloop"
npm ERR! cwd /home/ubuntu
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/strongloop/node_modules/strong-arc/node_modules/strong-pm/node_modules/strong-service-install/node_modules/strong-service-upstart/node_modules/lodash/internal/baseMergeDeep.js更新:
现在将npm和nodejs更新到2.11和0.12.7版本后出现以下错误:
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 3.13.0-48-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
> bufferutil@1.1.0 install /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 3.13.0-48-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
npm WARN deprecated MD5@1.2.2: deprecated, use lowercase 'md5@2.x' from now on
> strong-fork-syslog@1.2.3 install /usr/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/.node-gyp"
|发布于 2015-08-12 05:17:22
您是否尝试删除(或为备份重命名) ~/.npm目录并重试?ENOENT通常表示在上一个中断或错误的安装命令期间出现某种损坏和权限问题。
网上也有很多关于如何完全删除npm并重新安装的帖子,这也可能解决这个问题。
更新:这是我收集最近安装的所有内容的要点。特别是Node是一个难题(node vs nodejs可执行文件名称)。
发布于 2015-11-14 00:31:13
我得到了类似的错误,并通过符号链接nodejs解决了它,就像在这个answer中一样。这样做之后,安装就可以正常工作了。
https://stackoverflow.com/questions/31927399
复制相似问题