Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yeoman angular generator wont start on grunt serve

When I set up the angular generator with yeoman I get this error after doing grunt serve

module.js:340

    throw err;
          ^
Error: Cannot find module './lexer'
    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> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:10:10)
    at Object.<anonymous> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:167:4)
    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)
like image 822
Steve Birkner Avatar asked Jul 08 '14 18:07

Steve Birkner


1 Answers

As @SteveBirkner already mentioned, delete the node_modules directory and run npm install command again. It should work.

like image 172
xpepermint Avatar answered Sep 19 '22 17:09

xpepermint