本地 grunt 安装报错

Local grunt installation gives error

npm install -g grunt-cli   //done successfully

npm install grunt --save --only=dev   

给出以下错误

    (node:11000) fs: re-evaluating native module sources is not supported. If 
you are using the graceful
-fs module, please update it to a more recent version.
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
project@1.0.0 C:\Users\Live\Desktop\node grunt\final
`-- (empty)
npm WARN project@1.0.0 No repository field.
npm ERR! code 1

尝试过卸载 grunt-cli,清理 npm 缓存,然后重新安装,但问题仍然存在。

好的简短回顾:

  1. 如有疑问,请删除您的 node_modules 并使用 npm install
  2. 重新安装所有软件包
  3. 如果这不起作用,请尝试通过执行 npm update -g npm 并重做第 1 步来更新您的 npm
  4. 如果这不能解决您的问题,请尝试使用 nvm or n.
  5. 升级到另一个 NodeJS 版本