Gulp-util throwing error: cannot find module 'dateformat'
matthew-dean opened this issue · comments
I'm not sure, but I think this may be related to latest versions of NPM that produce a flat node_modules structure? In any case, can't seem to get my gulp scripts running because of this error.
Error: Cannot find module 'dateformat'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/gulp-util/index.js:5:9)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
Hmm, this may be an issue with gulp itself. After removing and reinstalling globally and locally, now I get this error:
Error: Cannot find module 'once'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> ({PATH}/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/index.js:1:74)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
Never mind, resolved using this solution: http://www.saintsatplay.com/blog/2015/01/resolving-gulp-cannot-find-module-errors#.VllE9t-rSHo