我在安装NW.js时遇到了一些问题。当我运行npm install nw
时,我收到以下错误消息:
> nw@0.12.3 postinstall /root/node_modules/nw
> node scripts/install.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! nw@0.12.3 postinstall: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the nw@0.12.3 postinstall script.
npm ERR! This is most likely a problem with the nw package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls nw
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.3.0-kali1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "nw"
npm ERR! cwd /root
npm ERR! node -v v4.2.6
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0
我很确定这个问题与第一节讨论正在安装的node
有关。我知道Debian存在一个问题,其中node
包实际上已被采用,因此他们使用nodejs
代替。我还不知道如何修复它,我已经尝试运行export node=nodejs
并将其添加到~/.bashrc
。有没有人对我能做什么有任何想法?我也遇到过其他npm软件包的问题。
答案 0 :(得分:0)
export node=nodejs
)