es学习笔记

node 安装 grunt 在 cmd 下 执行 npm install ‐g grunt‐cli 命令执行报错 

npm ERR! arg Argument starts with non-ascii dash, this is probably invalid: [ '‐g', 'grunt‐cli' ]

npm ERR! code EINVALIDTAGNAME

npm ERR! Invalid tag name "‐g": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in:

npm ERR!    C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-02-07T03_21_17_506Z-debug.log

解决方案是 以管理员身份 执行 cmd 然后 cd 到 node js的安装目录 然后再执行 就 ok了 

你可能感兴趣的:(es学习笔记)