我收到了所有这些错误。我使用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"
|
答案 0 :(得分:0)
您是否尝试删除(或重命名备份)您的~/.npm
目录并重试? ENOENT
通常表示在先前中断或错误安装命令期间出现某种损坏和权限问题。
网上还有很多关于如何完全删除npm并重新安装的帖子,这也可能解决了这个问题。
更新:这是我用来捕捉我最近安装的所有东西的要点。节点特别痛苦(节点与nodejs可执行文件名称)。
答案 1 :(得分:0)
我得到了类似的错误,并通过符号化这个answer中的nodejs来解决它。 完成此操作后,安装工作正常。