When I run Grunt, I receive the following message: Local npm module "grunt-contrib-copy" not found. Is it installed?
13,957
It seems that you don't have loaded the modules in the Gruntfile.js or you haven't installed all the modules. Try npm install <module-name> --save-dev
for all the modules.
Related videos on Youtube
Author by
Brian
Updated on June 04, 2022Comments
-
Brian almost 2 years
I have been trying to install Grunt. When I run grunt I receive the following list of messages and warnings:
Local Npm module "grunt-contrib-copy" not found. Is it installed? Local Npm module "grunt-contrib-uglify" not found. Is it installed? Local Npm module "grunt-contrib-jshint" not found. Is it installed? Local Npm module "grunt-contrib-less" not found. Is it installed? Local Npm module "grunt-contrib-clean" not found. Is it installed? Local Npm module "grunt-contrib-watch" not found. Is it installed? Local Npm module "grunt-contrib-concurrent" not found. Is it installed? Local Npm module "grunt-contrib-nodemon" not found. Is it installed? Local Npm module "grunt-contrib-newer" not found. Is it installed? Warning: Task "copy:vendor" not found. Use --force to continue. Aborted due to warnings.
I have tried "npm install", "npm install grunt --save-dev", "grunt init:node". to fix the problem; it didn't work. Can anyone help? Thanks.
-
Brian almost 9 yearsHere is my Gruntfile.js:
-
Brian almost 9 yearsThere are node_modules folder, Gruntfile.js, and package.json. I am not permitted to enter codes for Gruntfile.js and package.json since there are too many codes. What modules are missing that I should install? Are they called, e.g., "copy" or "uglify"? In package.json, e.g., I see
-
VDarricau almost 9 yearsTry
npm install grunt-contrib-copy --save-dev
and tell me if the error message has changed. -
Brian almost 9 yearsI could install all of them. When I run grunt, I receive file error: '. . /vendor/bootstrap/less/mixins.less' wasn't found. I've got some info regarding fixing this error, so I will try it.
-
Brian almost 9 yearsI copied and pasted @import "../vendor/bootstrap/less/variables.less"; in public/less/bootstrap-build.less on line 3, but when I run grunt I am getting the same message.
-
VDarricau almost 9 yearsAre you sure the file exists?
-
Brian almost 9 yearsYes, it does exist; I entered it as it should be. Yet I am getting the same error message as before.
-
VDarricau almost 9 yearsI am really sorry I don't see what is the problem. You should post another question on that matter.
-
sayume almost 9 yearsThere is a case that your last 'npm install' failed, so some of the module is not successfully installed, but npm think they are successfully installed. you can try to remove the whole node_modules folder and run 'npm install' to re-install all the modules, if you have the right package.json file.