Closed BrainyGuy closed 9 years ago
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?
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
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. :)
Should be fixed in 0.7.1 via #28.
I am using node version 0.10.35 & npm version 1.4.28 then after I am getting same error
Are you using version 0.7.1?
I changed my node version to 0.6.21 and it solved my error. Thanks for help.
Node 0.6? That sounds a little outdated compared to the current 0.12?
What I am using is five year old project and it needs node version less than 0.7
The Grunt task has a dependency on 'glob', but does not install it.