I installed this:
https://www.npmjs.com/package/derequire
with
npm install derequire --save-dev
It appeared in the package.json file
"devDependencies": {
"derequire": "^2.0.3",
but when in Gruntfile.js I do:
grunt.loadNpmTasks('derequire');
I get the following error: Local Npm module "derequire" not found. Is it installed?
Other dependencies work fine.
I noticed that other dependencies are prefixed with 'grunt-' (eg: 'grunt-contrib-concat'). Does it mean that I can't use this NPM derequire in grunt? How can I enable it?
grunt.loadNpmTasks('derequire');
doesn't work because it's supposed to be used with Grunt plugins. See the reference . You can't just use it with regular NPM packages.
For a list of Grunt plugins, take a look here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.