gpt4 book ai didi

javascript - 安装 yeoman 的问题

转载 作者:搜寻专家 更新时间:2023-11-01 00:11:15 24 4
gpt4 key购买 nike

我正在尝试安装 yeoman,但收到以下错误消息:

我确实安装了 node.js 和 npm(最新版本),现在我正在这样做

npm install -g yo grunt-cli bower

and

npm install -g yo

但我收到以下错误消息

npm http GET https://registry.npmjs.org/yo
npm http 200 https://registry.npmjs.org/yo

npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/siddhartha/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home/siddhartha
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: yo
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/siddhartha/npm-debug.log
npm not ok

怎么了?我的 linux 系统、npm 或 node.js 有问题吗?我需要 yeoman 尽快启动并运行,但我卡住了。

最佳答案

您可以尝试阅读错误信息:

npm ERR! Perhaps not compatible with your version of node?

Yeoman 需要 Node >=0.8,但你有 Node 0.6:

npm ERR! node -v v0.6.19

升级到最新的稳定 Node 应该可以。

sudo apt-get install node -y

关于javascript - 安装 yeoman 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17885955/

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