ng服务:找不到模块“可点击" [英] ng serve: Cannot find module 'tapable'
本文介绍了ng服务:找不到模块“可点击"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚将Angular 5项目从一台计算机转移到另一台计算机,并且在新设备中尝试ng serve
时出现以下错误:
I just transfered my Angular 5 project from one computer to another and in the new device I get the following error when trying to ng serve
:
Cannot find module 'tapable'
Error: Cannot find module 'tapable'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (c:\xampp\node_modules\webpack\lib\Template.js:7:17)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (c:\xampp\node_modules\webpack\lib\node\NodeMainTemplatePlugin.js:5:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
我试图:
- 删除
node_modules
并再次运行npm install
. -
npm install tapable
- Remove
node_modules
and run againnpm install
. npm install tapable
我的节点版本是6.11.2,npm 5.3.
My node version is 6.11.2 with npm 5.3.
有什么办法可以解决吗?
Any idea what can solve it?
推荐答案
修复:我必须手动npm install webpack
才能解决此问题.
Fix: I had to manually npm install webpack
in order to solve this issue.
这篇关于ng服务:找不到模块“可点击"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文