相关疑难解决方法(0)

ubuntu 12.04上的nodejs vs node

我在这里给出的指令上安装了ubuntu上的nodejs

当我node --version在终端写信时,我看到了这个:
-bash: /usr/sbin/node: No such file or directory

不过,我可以在/usr/sbin/目录中看到节点.

写作npm --version表明1.3.5
写作nodejs --version表演v0.10.15

另外,我可以在/usr/bin/目录中看到节点.

那么,我该如何node工作?

此外,如果我使用zsh而不是bash,那么node命令工作.

javascript ubuntu serverside-javascript node.js

359
推荐指数
11
解决办法
22万
查看次数

npm install -g yo命令给出 - > ERR!yo@1.1.0 postinstall:`node scripts/doctor.js`

我只是尝试做一个npm安装,但最后得到关于医生,js的这个错误.我需要担心吗?

npm install -g哟

..

npm http 304 https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/cli.js

> yo@1.1.0 postinstall /usr/local/lib/node_modules/yo
> node scripts/doctor.js

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! yo@1.1.0 postinstall: `node scripts/doctor.js`
npm ERR! `sh "-c" "node scripts/doctor.js"` failed with 1
npm ERR! 
npm ERR! Failed at the yo@1.1.0 postinstall script.
npm ERR! This is most likely a problem with the …
Run Code Online (Sandbox Code Playgroud)

npm yeoman

16
推荐指数
4
解决办法
8278
查看次数