gpt4 book ai didi

node.js - 在 Windows 上通过 npm 安装 grunt-cli 包失败

转载 作者:可可西里 更新时间:2023-11-01 09:52:47 26 4
gpt4 key购买 nike

我无法在 Windows 7 上安装 grunt

我正在尝试通过此命令安装它:

npm install ‐g grunt‐cli

但它给了我以下错误:

C:\Windows\System32>npm install -g grunt-cli
npm ERR! addLocal Could not install C:\Windows\System32\-g
npm ERR! addLocal Could not install C:\Windows\System32\grunt-cli
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! path C:\Windows\System32\-g
npm ERR! code ENOENT
npm ERR! errno -4058

npm ERR! enoent ENOENT, open 'C:\Windows\System32\-g'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\System32\npm-debug.log

最佳答案

更改参数的顺序:

npm install ‐g grunt‐cli

npm install grunt-cli -g

干杯!

关于node.js - 在 Windows 上通过 npm 安装 grunt-cli 包失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31201380/

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