Grunt Error--fatal error:unable to find Gruntfile

Source: Internet
Author: User

nottheforon how to configure grunt: http://gruntjs.com/getting-startedto find Gruntfile.

The error hint Gruntfile.js file could not be found, but the project already has a Gruntfile.js file that was later found to be installed with the npm module is grunt not complete (may be interrupted in the installation, but grunt the module directory already exists with the node_modules directory), the workaround is to reinstall grunt Module:

E:\website\jquery-plugins>npm install grunt

Execute again:

E:\website\jquery-plugins> gruntLoading "uglify.js" tasks...ERROR>> Error: ENOENT, no such file or directory ‘E:\website\jquery-plugins\node_modules\grunt-contrib-uglify\node_modules\uglify-js\lib\utils.src‘Warning: Task "uglify" not found. Use --force to continue.Aborted due to warnings.

Error message without this file or directory, guess grunt the uglify plugin is not installed complete, reinstall:

E:\website\jquery-plugins>npm install grunt-contrib-uglify--save-dev

Execute grunt The default tasks (I am here by default tasks only uglify )

"uglify:build"1filewithout errors.

Grunt Error--fatal error:unable to find Gruntfile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.