1、ES安装head离线启动grunt时,报错找不到包
[root@corre home]# grunt -version
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module 'grunt-cli/bin/grunt'
Require stack:
2.实际是我们通过npm安装时候,在 node_modules下生成的包的文件名字是grunt
[root@corre node_modules]# ls
cnpm grunt npm
3.只需把文件名字改为grunt-cli
[root@corre node_modules]# mv grunt/ grunt-cli
4.最后验证
[root@corre home]# grunt -version
grunt-cli v1.2.0
grunt v1.0.4