Shadi Abu Hilal
Shadi Abu Hilal

Reputation: 288

Local Npm module "GRUNT-PLUGIN-MODULE" not found. Is it installed? What's causing this?

How to load your new grunt-plugin module to your project.

example of dir structure:

|-- abc-project
|       |-- ...
|       |-- app.js
|       |-- Gruntfile.js --> `grunt.loadNpmTasks('my-grunt-plugin');`
|       \-- package.json
|
\-- my-grunt-plugin
      |-- grunt-tasks
      |       |-- task-a.js --> `grunt.registerTask('task-a', 'running task a', function() { ... });`
      |       \-- task-b.js
      \-- ...

Upvotes: 2

Views: 416

Answers (1)

Shadi Abu Hilal
Shadi Abu Hilal

Reputation: 288

The issue in this case is the task dir name in the my-grunt-plugin. You need to make sure that the name of task dir is always tasks NOT grunt-tasks.

Upvotes: 0

Related Questions