dev123
dev123

Reputation: 333

grunt js not working in windows

I am first time user of grunt on windows and using grunt 0.3 version. I installed nodejs, npm and then installed grunt 0.3 using ->

 npm install -g [email protected] --save-dev

When tried grunt build in windows it was giving error Microsoft jquery runtime error, Object expected.

Then I found out that in windows grunt build doesn't work and so I used grunt.cmd. It looks lil better as I dont get the jquery exception but now I get following errors and still unable to build -

path.existsSync is now called `fs.existsSync`.
>> Npm module "grunt-css" not found. Is it installed?
>> Npm module "grunt-jasmine-runner" not found. Is it installed?
>> Npm module "grunt-contrib-copy" not found. Is it installed?
>> Npm module "grunt-dustjs" not found. Is it installed?
>> Npm module "grunt-contrib-less" not found. Is it installed?

Running "docs:dist" (docs) task
python ./libs/atnotate/atnotate.py -s ./src/ -d ./docs/ -t ./libs/atnotate/templates
<WARN> Task "dustjs" not found. Use --force to continue. </WARN>

Aborted due to warnings.

Will really appreciate any help you can provide.

Thanks

Update after Kevin's solution, I have all files but still it doesn't find the grunt-css -

 ls -l /usr/local/lib/node_modules/

drwxr-xr-x  14 nobody  wheel  476 Feb 28 15:02 grunt
drwxr-xr-x  14 nobody  staff  476 Feb 28 14:37 grunt-contrib-copy
drwxr-xr-x  14 nobody  staff  476 Feb 28 14:38 grunt-contrib-less
drwxr-xr-x  11 nobody  wheel  374 Feb 28 15:19 grunt-css
drwxr-xr-x  10 nobody  wheel  340 Feb 28 15:18 grunt-dustjs
drwxr-xr-x  17 nobody  staff  578 Feb 28 14:38 grunt-jasmine-runner
drwxr-xr-x  21 24561   staff  714 Feb 28 14:04 npm

# grunt build
path.existsSync is now called `fs.existsSync`.
  >> Npm module "grunt-css" not found. Is it installed?
   <WARN> Task "cssmin" not found. Use --force to continue. </WARN>

  Aborted due to warnings.

Upvotes: 0

Views: 2174

Answers (1)

Kevin Reilly
Kevin Reilly

Reputation: 6252

The error suggests that your Gruntfile.js might be referencing grunt modules that are not yet installed in this project.

If these dependencies are defined in package.json, you should only need to npm install

If they are not defined in package.json, you may need to manually install these modules and save them to your development dependencies.

npm install --save-dev grunt-css grunt-jasmine-runner grunt-contrib-copy grunt-dustjs grunt-contrib-less

Upvotes: 2

Related Questions