Error: Cannot find module 'time-grunt'

vitya-ne

I try install time-grunt local and global, clear npm cache, update npm, but nothing helps. I get:

 Loading "Gruntfile.js" tasks...ERROR
 Error: Cannot find module 'time-grunt'
 Warning: Task "default" not found. Use --force to continue.

My version od packages: node: '0.10.31', npm: '1.4.23'

After run: npm install --save-dev time-grunt in package.json state:

"devDependencies": {
"grunt": "^0.4.5",
...
"time-grunt": "^1.0.0"
}

This is part of my grunfile.js:

module.exports = function( grunt ) {
     require('time-grunt')(grunt);

     grunt.initConfig({
     // grunt tasks here
     });
     // load tasks here
     // register task here
}

Other grunt tasks runing without error.

I not understand what is wrong.

How I can test correctly installation of time-grunt by command line?

Shiyaz

You need to add it inside dependencies and not within devDependencies. This way you don't need to separately run $ npm install --save-dev time-grunt

{
  "name": "grunt-build",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "time-grunt": "^1.3.0"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-clean": "~0.7.0",
    "grunt-contrib-compress": "~0.5.0",
    "grunt-contrib-concat": "~0.5.0",
    "grunt-contrib-copy": "^0.8.0",
    "grunt-contrib-uglify": "~0.5.0",
    "grunt-remove-logging": "~0.2.0"
  }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

grunt "Error: Cannot find module '../time/convert' (only on windows)

From Dev

grunt error: cannot find module 'globule'

From Dev

Sails.js + Grunt "Cannot find module" Error

From Dev

Grunt Error Cannot find module 'win-spawn'

From Dev

Grunt fails with "Cannot find module" for a local module

From Dev

Browserify + Grunt + Remapify: Cannot Find Module

From Dev

grunt Cannot find module 'coffee-script'

From Dev

Cannot find module 'karma' while using grunt

From Dev

Error: Cannot find module './'

From Dev

Error: Cannot find module './'

From Dev

NPM - Error: Cannot find module '../'

From Dev

Error: Cannot find module './args'

From Dev

Error - Cannot find module 'config'

From Dev

Error: Cannot find module 'libxmljs'

From Dev

Error - Cannot find module 'broccoli'

From Dev

Error: Cannot find module './pulp'

From Dev

Error: Cannot find module 'ms'

From Dev

Error: Cannot find module 'mongodb'

From Dev

Error - Cannot find module 'broccoli'

From Dev

Error: Cannot find module 'libxmljs'

From Dev

Error: Cannot find module './development'

From Dev

Error: Cannot find module './args'

From Dev

Error: Cannot find module './lodash'

From Dev

Error: Cannot find module './algs'

From Dev

Error: Cannot find module 'AsyncDependencyToInitialChunkWarning'

From Dev

Cannot find module '@tridnguyen/config' | Install npm grunt

From Dev

Cannot find module 'grunt-lib-phantomjs' in 'grunt-contrib-qunit'

From Dev

Error: Error: Cannot find module ' in angular js?

From Dev

grunt error TS2304 cannot find name