I installed npm, bower and gulp. But while running gulp app:serve, I am getting the following error. Please help me. This is the command I run: sachin@sachin:~/Desktop/workspace/myproj/angular/ex (master)$gulp app:serve
我安装了npm,bower和gulp。但是在运行gulp app:serve时,我收到以下错误。请帮帮我。这是我运行的命令:sachin @ sachin:〜/ Desktop / workspace / myproj / angular / ex(master)$ gulp app:serve
Result I got:
结果我得到了:
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)
1 个解决方案
#1
24
Error: Cannot find module 'require-dir'
错误:找不到模块'require-dir'
You've installed gulp but have not installed its tasks' dependencies. E.g. if a gulp task has any require('')
calls, then it depends on require-dir. Those dependencies are probably in your project's package.json file. To install all the dependencies run:
您已安装gulp但尚未安装其任务的依赖项。例如。如果gulp任务有任何require('')调用,那么它取决于require-dir。这些依赖项可能在您的项目的package.json文件中。要安装所有依赖项,请运行:
npm install
#1
24
Error: Cannot find module 'require-dir'
错误:找不到模块'require-dir'
You've installed gulp but have not installed its tasks' dependencies. E.g. if a gulp task has any require('')
calls, then it depends on require-dir. Those dependencies are probably in your project's package.json file. To install all the dependencies run:
您已安装gulp但尚未安装其任务的依赖项。例如。如果gulp任务有任何require('')调用,那么它取决于require-dir。这些依赖项可能在您的项目的package.json文件中。要安装所有依赖项,请运行:
npm install