Cannot Find Module 'glob'


Answer :

There's already an issue reporting this error message. The workaround until the next release is to install glob for the project (npm install --save glob)

Regarding the commands, according to their repository under Generating and serving an Angular2 project via a development server the commands are as follow

ng new ponyracer : This command will create a project named ponyracer (a folder named ponyracer with all the set up in it).

ng serve : This command will run the live reload server to serve the application so you can see it in your browser.

PS : If you test the solution suggested in the issue it would be nice of you to report if it worked or not.

PS2 : I tested now (I fixed my error) and I cannot reproduce your error. I'm using node v5.5.0 and npm v3.7.3. Can you specify which node and npm versions are you using?


I had the same error on Windows 10,

D:\Code\AngularJS>ng new greetings-ac Cannot find module 'glob' Error: Cannot find module 'glob'     at Function.Module._resolveFilename (module.js:336:15)     at Function.Module._load (module.js:278:25)     at Module.require (module.js:365:17)     at require (module.js:384:17)     at Object.<anonymous> (D:\Code\node_modules\angular-cli\addon\ng2\tasks\lib-install.js:11:19)     at Module._compile (module.js:460:26)     at Object.Module._extensions..js (module.js:478:10)     at Module.load (module.js:355:32)     at Function.Module._load (module.js:310:12)     at Module.require (module.js:365:17)     at require (module.js:384:17)

but the following fixed it:

D:\Code\AngularJS>npm install -g angcli

D:\Code\AngularJS>ng new greetings-ac ? Select project blueprint: Default template Cloning into 'D:\Code\AngularJS\greetings-ac'... install installing using npm npm WARN package.json angularApp@0.0.0 No description npm WARN package.json angularApp@0.0.0 No repository field. npm WARN package.json angularApp@0.0.0 No README data npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0. npm WARN optional dep failed, continuing fsevents@1.0.7 npm WARN deprecated lodash-node@3.10.2: This package has been discontinued in favor of lodash@^4.0.0. npm WARN optional dep failed, continuing fsevents@1.0.7


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?