Grunt warning
See original GitHub issueIssue Summary
When running grunt commands, it serves a warning that
Local Npm module "grunt-cli" not found. Is it installed?
Research in other repositories, such as https://github.com/backbone-boilerplate/backbone-boilerplate/issues/237 indicate that the fix is to relocate the grunt-cli
dependency from devDependencies
to peerDependencies
in the package.json
file. I have submitted relevant PR in the case that this is a correct solution.
Steps to Reproduce
npm install
grunt
Technical details
- Ghost Version: master - latest commit: 2329edd
- Server OS: Ubuntu 13.10
- Node Version: v0.10.25
Issue Analytics
- State:
- Created 10 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
grunt.fail - Grunt: The JavaScript Task Runner
Display a warning and abort Grunt immediately. Grunt will continue processing tasks if the --force command-line option was specified. The error argument can ......
Read more >Grunt aborted due to warnings - Stack Overflow
In my Gruntfile.js directory, i'm installing grunt in this way: npm install grunt; npm install -g grunt-cli; grunt watch.
Read more >grunt-alert - npm
Sends alerts about failing builds using different channels. Latest version: 0.3.3, last published: 7 years ago. Start using grunt-alert in ...
Read more >Grunt Style Warning! May Tell War Stories Men's T-Shirt
Buy Grunt Style Warning! May Tell War Stories Men's T-Shirt (Military Green, XLarge): Shop top fashion brands T-Shirts at Amazon.com ✓ FREE DELIVERY...
Read more >Warning! May Tell War Stories Men's Tee - Military Green
Warning ! May Tell War Stories Men's Tee - Military Green. Regular price $10.38 ... This Warning! May Tell War Stories tee is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just chiming in here.
grunt-cli
should stay as adevDependencies
. That way it is only installed when the user does anpm install
from the project folder (and we are assuming developing Ghost itself).peerDependencies
are for user end dependencies the project indirectly relies on. Dependencies listed there would be installed when the user does anpm install packagename
. Which we wouldn’t want end users installing grunt-cli, only developers.dependencies
are for user end dependencies the project directly relies on and also get installed when an end user does anpm install packagename
.The message
Local Npm module "grunt-cli" not found. Is it installed?
comes from attempting togrunt.loadNpmTasks('grunt-cli')
. Grunt thinks you’re trying to load a grunt task but grunt-cli is not a grunt task, so it complains.Avoid loading grunt-cli as a task with
require('matchdep').filterDev(['grunt-*', '!grunt-cli']).forEach(grunt.loadNpmTasks);
instead.Fixed by #2218