Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp task - Error: Cannot find module 'glob' #27

Closed
BrainyGuy opened this issue Sep 7, 2014 · 9 comments · Fixed by #28
Closed

Gulp task - Error: Cannot find module 'glob' #27

BrainyGuy opened this issue Sep 7, 2014 · 9 comments · Fixed by #28

Comments

@BrainyGuy
Copy link

The Grunt task has a dependency on 'glob', but does not install it.

@daffl
Copy link
Contributor

daffl commented Sep 7, 2014

Where? I can only see a glob dependency in the Gulp task and it is being installed in the devDependencies (which might be wrong). What's the breaking example?

@alexey-shaposhnikov
Copy link

var compilerGulp = require('can-compile/gulp.js');

var options = {
    version: '2.0.0',
    src: ['app/templates/*.ejs'],
    out: 'app/templates/templates.js',
    tags: ['editor', 'my-component']
};
compilerGulp.task('app-views', options, gulp);
compilerGulp.watch('app-views', options, gulp);
gulp.task('tpl', [
    'app-views',
    'app-views-watch'
]);

Error: Cannot find module 'glob'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/alexey/projects/asd/node_modules/can-compile/gulp.js:4:10)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/alexey/projects/asd/gulpfile.js:21:20)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
  at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:159:12)
  at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
  at Liftoff.launch (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:152:5)
  at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:67:5)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:906:3

@jmsherry
Copy link

Yeah, I had this too...

TBH, I just loaded the original glob globally and debugged from there... I got it working pretty quickly, but it's not great to be messing around with internal files. :/

Not slating the product though - very much appreciated. :)

@daffl daffl changed the title Grunt task - Error: Cannot find module 'glob' Gulp task - Error: Cannot find module 'glob' Nov 30, 2014
@daffl daffl closed this as completed in #28 Nov 30, 2014
@daffl
Copy link
Contributor

daffl commented Nov 30, 2014

Should be fixed in 0.7.1 via #28.

@bhaveshvavdiya
Copy link

I am using node version 0.10.35 & npm version 1.4.28 then after I am getting same error

@daffl
Copy link
Contributor

daffl commented Jan 19, 2015

Are you using version 0.7.1?

@bhaveshvavdiya
Copy link

I changed my node version to 0.6.21 and it solved my error.
Thanks for help.

@daffl
Copy link
Contributor

daffl commented Apr 26, 2015

Node 0.6? That sounds a little outdated compared to the current 0.12?

@bhaveshvavdiya
Copy link

What I am using is five year old project and it needs node version less than 0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants