johnpapa / ng-demos

variety of angular demos
MIT License
1.7k stars 961 forks source link

Modular error when running gulp serve-dev #77

Open enterpriseSoftware opened 8 years ago

enterpriseSoftware commented 8 years ago

$ gulp serve-dev

module.js:340 throw err; ^ Error: Cannot find module 'inflight' 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. (/usr/local/lib/node_modules/gulp/node_modules/glob/glob.js:57:16) 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)

chcanteloube commented 8 years ago

Hi,

You can try this npm uninstall -g gulp npm install -g gulp

That works for me !

ingcrengifo commented 8 years ago

Hi, I also have a problem error

in the image I give stays stuck on that part, I tried it on Windows and OS X, the case in the 2 systems

gugol2 commented 8 years ago

Note that gulp is a devDependency in package.json so if in trouble you can just do npm start and browse in port 7200 instead of 7203. By the way with npm install --production you only install the dependencies and not the devDependencies.

gugol2 commented 8 years ago

Anyway I would try the installation from the beginning again (it took me a couple of times because I cancelled in the middle of the npm install because it was taking too long):

  1. Delete the node_modules folder.
  2. npm cache clean
  3. npm install again and wait until it finishes (you will probably get a few warning messages, just ignore them).
  4. Try gulp serve-dev again.

Cheers!