我在安装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软件包中也遇到了这个问题。
发布于 2016-02-17 13:44:21
export node=nodejs)https://stackoverflow.com/questions/35235840
复制相似问题