node.js - Grunt error - cannot find module 'tough cookie' -
i getting error , don't know make of it.
grunt works fine on machine, failing on server. they're both same os. , thinking package.json might have installed later version of on server broke grunt. use ^
of dependencies, should compatible. here grunt error:
loading "compress.js" tasks...error >> error: cannot find module 'lodash' loading "connect.js" tasks...error >> error: cannot find module 'cookie-signature' loading "imagemin.js" tasks...error >> error: cannot find module 'js-yaml' loading "jasmine.js" tasks...error >> error: cannot find module 'lodash' loading "jshint.js" tasks...error >> error: cannot find module 'hooker' loading "less.js" tasks...error >> error: cannot find module 'lodash' /home/jeremy/421_api/node_modules/grunt-contrib-requirejs/node_modules/requirejs/bin/r.js:16208 /** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ loading "requirejs.js" tasks...error >> syntaxerror: unexpected token illegal loading "stylus.js" tasks...error >> error: cannot find module 'lodash' running "test" (mochatest) task 1) "before all" hook 0 passing (172ms) 1 failing 1) "before all" hook: uncaught error: cannot find module 'tough-cookie' fatal error: cannot find module 'tough-cookie'
here package.json
{ ..., "dependencies": { "bcrypt-nodejs": "0.0.3", "body-parser": "~1.12.0", "cookie-parser": "^1.3.4", "cors": "^2.5.3", "express": "~4.12.1", "express-session": "^1.10.4", "jade": "^1.9.2", "method-override": "^2.3.3", "mongoose": "^4.0.1", "mongoose-lifecycle": "^1.0.0", "morgan": "^1.5.2", "passport": "^0.2.2", "passport-http": "^0.2.2", "q": "^1.3.0", "string": "^3.1.1", "validator": "^3.37.0" }, "devdependencies": { "chai": "^2.3.0", "execsync": "^1.0.2", "forever": "^0.14.1", "grunt": "latest", "grunt-cli": "^0.1.13", "grunt-contrib": "^0.11.0", "grunt-contrib-clean": "^0.5.0", "grunt-contrib-coffee": "^0.10.1", "grunt-contrib-compass": "^0.7.2", "grunt-contrib-compress": "^0.8.0", "grunt-contrib-concat": "^0.4.0", "grunt-contrib-connect": "^0.7.1", "grunt-contrib-copy": "^0.5.0", "grunt-contrib-csslint": "^0.2.0", "grunt-contrib-cssmin": "^0.9.0", "grunt-contrib-handlebars": "^0.8.0", "grunt-contrib-htmlmin": "^0.2.0", "grunt-contrib-imagemin": "^0.7.2", "grunt-contrib-jade": "^0.11.0", "grunt-contrib-jasmine": "^0.6.5", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-jst": "^0.6.0", "grunt-contrib-less": "^0.11.4", "grunt-contrib-nodeunit": "^0.3.3", "grunt-contrib-qunit": "^0.4.0", "grunt-contrib-requirejs": "^0.4.4", "grunt-contrib-sass": "^0.7.4", "grunt-contrib-stylus": "^0.15.1", "grunt-contrib-symlink": "^0.3.0", "grunt-contrib-uglify": "^0.4.1", "grunt-contrib-watch": "^0.6.1", "grunt-contrib-yuidoc": "^0.5.2", "grunt-mocha": "^0.4.12", "grunt-mocha-test": "^0.12.7", "mocha": "^2.2.5", "passport-local": "^1.0.0", "pm2": "0.12.11", "supertest": "^1.0.1" } }
and here gruntfile:
// gruntfile.js module.exports = function(grunt){ // load grunt mocha task grunt.loadnpmtasks('grunt-mocha'); grunt.loadnpmtasks('grunt-mocha-test'); grunt.loadnpmtasks('grunt-contrib'); grunt.initconfig({ pkg: grunt.file.readjson('package.json'), // mocha test mochatest: { test: { options: { reporter: 'list', timeout: 2000 }, src: ['test/groups.js', 'test/doctors.js', 'test/patients.js', 'test/diet.js', 'test/admin.js'] }, web_enter: { // fill database website testing options: { reporter: 'list', timeout: 2000 }, src: ['test/web_testing_enter.js'] }, web_remove: { // remove data entered website testing options: { reporter: 'list', timeout: 2000 }, src: ['test/web_testing_remove.js'] } } }); grunt.registertask('we', ['mochatest:web_enter']); grunt.registertask('wr', ['mochatest:web_remove']); grunt.registertask('default', ['mochatest:test']); };
Comments
Post a Comment