我安装了npm、bower和gulp。但在运行gulp app:serve时,我遇到了以下错误。请帮忙。
这是我运行的命令:
sachin@sachin:~/Desktop/workspace/myproj/angular/ex (master)$gulp app:serve
我得到的结果:
Error: Cannot find module 'require-dir'
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> (/home/sachin/Desktop/workspace/myproj/angular/ex/gulpfile.js:14:1)
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)
ex
目录下运行了npm install
命令? - robertkleprequire-dir -g
(全局)吗? - Lucas Rodrigueznpm install
就解决了问题,我漏掉了它。 - sachin godnpm install require-dir
。 - Franz Holzinger