gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 14:30:21 26 4
gpt4 key购买 nike

我只是尝试进行 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 yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/doctor.js
npm ERR! You can get their info via:
npm ERR! npm owner ls yo
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! cwd /etc/libvirt/qemu
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /etc/libvirt/qemu/npm-debug.log
npm ERR! not ok code 0

编辑_ ___________ ——

出于某种原因, node -v 在终端中不输出任何内容

我安装了最新的节点:

WebstormProjects # sudo apt-get 安装节点
阅读包裹 list ...完成
构建依赖树
读取状态信息...完成
node 已经是最新版本了。
0 升级,0 新安装,0 删除,143 未升级。

最佳答案

此链接中的解决方案对我有用:

http://plaidzooks.tumblr.com/post/36894116867/using-node-js-on-debian-ubuntu-systems

Ubuntu 附带了一个自动创建链接的包,因此只能通过创建链接来调用命令“nodejs”作为“节点”。

sudo apt-get install nodejs-legacy

这让 Yeoman 开始工作。

关于npm install -g yo 命令给出 -> ERR! yo@1.1.0 安装后 : `node scripts/doctor.js` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20881075/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com