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)
解决办法:
- Package.json: remove webpack from DevDependencies
rm -R node_modules
(remove node_modules folder)npm i -g webpack
npm i -g webpack-dev-server
- remove
package-lock.json
(if it's there) npm i
npm start