【发布时间】:2015-09-20 23:24:06
【问题描述】:
我无法在 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
【问题讨论】:
-
我认为您需要更改文件夹我不会在 C:\Windows\System32\ 下安装包
-
看起来它正在尝试将
-g标志视为要安装的包。你能确认你使用的是标准的破折号作为标志吗?你可以尝试对npm install --global grunt-cli做同样的事情吗?
标签: node.js windows gruntjs npm