gpt4 book ai didi

node.js - 无法在 WIndows 中使用 npm

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

Error message in cmd.exe

嗨我无法在 Windows 8.1 64 位上使用 npm。它显示图像链接中的错误消息。我已经安装了 nodejs v5.7.1

错误信息:'CALL "C:\Program Files\nodejs\node.exe""C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js"前缀 -g' 未被识别为内部或外部 com要求,可运行的程序或批处理文件。3.6.0

尝试更改 PATH 变量并在不同的驱动器中安装新副本

请帮忙。谢谢

最佳答案

下载Cygwin

以管理员身份启动 Cygwin 终端,然后运行以下命令

curl -L "https://npmjs.org/install.sh"| sh

这将执行 NPM 的全新安装。下载可能需要一段时间,但如果一切顺利,安装完成后,最后打印的内容将是 It Worked


编辑:从 npm-windows-upgrade 更改为 Cygwin

关于node.js - 无法在 WIndows 中使用 npm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35873839/

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