Mac下安装grunt

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/meifannao789456/article/details/82972990

当你在使用grunt命令时提示:grunt: command not found,说明你的本地环境没有grunt命令。

执行命令安装grunt:

npm install grunt

使用命令grunt -version查看安装的版本

碰到错误提示:Fatal error: Unable to find local grunt.
使用命令npm install grunt --save-dev 更新版本。

如果提示以下信息:

>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-concat" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?

则是grunt.js缺少以上引用,使用 npm install (module name)以此安装即可。

猜你喜欢

转载自blog.csdn.net/meifannao789456/article/details/82972990