首页
学习
活动
专区
圈层
工具
发布

安装NW.js
EN

Stack Overflow用户
提问于 2016-02-06 00:33:29
回答 1查看 2.2K关注 0票数 0

我在安装NW.js时遇到了一些困难。当我运行npm install nw时,我会收到以下错误消息:

代码语言:javascript
复制
> 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软件包中也遇到了这个问题。

EN

回答 1

Stack Overflow用户

发布于 2016-02-17 13:44:21

  1. nodejs可执行文件称为节点,而不是nodejs。所以,只需删除你添加的行。(export node=nodejs)
  2. 如果它仍然不能工作:尝试通过包管理重新安装节点(apt/yum/dnf),或者尝试从网站(https://nodejs.org/en/download/)重新安装可执行文件和安装路径。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35235840

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档