Error: No module factory available for dependency type: ContextElementDependency

40% building 68/69 modules 1 active ...im\Web.UI.Claim\wwwroot\src\styles.scss× 「wdm」: Error: No module factory available for dependency type: ContextElementDependency
at addDependency (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:800:12)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:816:5)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:819:5)
at Compilation.processModuleDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:827:4)
at afterBuild (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:954:15)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:998:11
at callback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:734:5)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:782:12
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:282:4
at ContextModule.result.resolveDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:51 at ContextModule.build (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:203:8)
at Compilation.buildModule (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:739:10)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:981:14
D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16
throw new Error('Callback was already called.');
^

Error: Callback was already called.
at throwError (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16:11)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:2818:7
at processTicksAndRejections (internal/process/task_queues.js:79:11)

 

 

解决办法:

  1. Package.json: remove webpack from DevDependencies
  2. rm -R node_modules (remove node_modules folder)
  3. npm i -g webpack
  4. npm i -g webpack-dev-server
  5. remove package-lock.json (if it's there)
  6. npm i
  7. npm start

 

上一篇:Java介绍


下一篇:Web编辑器 实现ctrl+v粘贴图片并上传、word粘贴带图片