grunt clean提示错误

我在命令栏输入grunt clean,提示如下错误

grunt-cli: The grunt command line interface (v1.2.0)

Fatal error: Unable to find local grunt.

If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:

http://gruntjs.com/getting-started`

解决方法

sudo npm install -g grunt-cli

运行完以上命令继续以下命令

cd [my project root]
npm install grunt --save-dev

运行grunt,出现以下错误

Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'node-minify'
Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.

重新运行

npm install –save-dev node-monify
npm install

你可能感兴趣的:(grunt)