Javascript 错误:依赖项类型:ContextElementDependency没有可用的模块工厂

Javascript 错误:依赖项类型:ContextElementDependency没有可用的模块工厂,javascript,node.js,angular,npm,npm-install,Javascript,Node.js,Angular,Npm,Npm Install,我从GitLab克隆了这个项目,并安装了npm s下载了所有依赖项,没有出现任何问题,但是当我执行npm start时,由于没有模块工厂可用于依赖项类型:ContextElementDependency,因此失败。此错误 我在本地计算机中使用的是节点版本6.9.2 错误: 18% building modules 70/104 modules 34 active ...node_modules\querystring-es3\index.jsError: No module factory av

我从GitLab克隆了这个项目,并安装了npm s下载了所有依赖项,没有出现任何问题,但是当我执行
npm start
时,由于没有模块工厂可用于依赖项类型:ContextElementDependency,因此失败。此错误

我在本地计算机中使用的是节点版本6.9.2

错误:

18% building modules 70/104 modules 34 active ...node_modules\querystring-es3\index.jsError: No module factory available for dependency type: ContextElementDependency
    at Compilation.addModuleDependencies (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:206:21)
    at Compilation.processModuleDependencies (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:195:8)
    at _this.buildModule.err (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:335:13)
    at building.forEach.cb (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:140:27)
    at Array.forEach (native)
    at callback (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:140:13)
    at module.build (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:167:11)
    at ContextModule.<anonymous> (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\ContextModule.js:118:3)
    at ContextModule.result.resolveDependencies (C:\Users\3643585\Desktop\ecamv2\node_modules\@ngtools\webpack\src\plugin.js:224:25)
    at ContextModule.build (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\ContextModule.js:99:7)
    at Compilation.buildModule (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:142:10)
    at factoryCallback (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:324:11)
    at C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\ContextModuleFactory.js:96:12
    at C:\Users\3643585\Desktop\ecamv2\node_modules\tapable\lib\Tapable.js:268:11
    at done.then (C:\Users\3643585\Desktop\ecamv2\node_modules\@ngtools\webpack\src\plugin.js:226:28)
 18% building modules 70/105 modules 35 active ...ode_modules\webpack\buildin\global.jsC:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:264
                                if(_this.profile) {
                                        ^

TypeError: Cannot read property 'profile' of null
    at factoryCallback (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:264:13)
    at C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\NormalModuleFactory.js:242:4
    at C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\NormalModuleFactory.js:93:13
    at C:\Users\3643585\Desktop\ecamv2\node_modules\tapable\lib\Tapable.js:268:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (C:\Users\3643585\Desktop\ecamv2\node_modules\tapable\lib\Tapable.js:272:13)
    at onDoneResolving (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\NormalModuleFactory.js:68:11)
    at onDoneResolving (C:\Users\3643585\Desktop\ecamv2\node_modules\@angular\cli\node_modules\webpack\lib\NormalModuleFactory.js:189:6)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fxo-ecam@0.0.2 start: `ng serve --proxy ./dev-proxies/local.proxy.conf.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fxo-ecam@0.0.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\3643585\AppData\Roaming\npm-cache\_logs\2018-12-06T22_57_26_745Z-debug.log

这可能是因为网页包版本

我遇到了同样的错误,我删除了node_modules文件夹和package-lock.json文件,并再次安装了npm。这些步骤解决了我的问题

1. rm -r node_modules
2. rm package-lock.json
3. npm i

干杯

这是可行的,但我试了很多次,似乎前后不一致。。有什么永久的解决办法吗??
1. rm -r node_modules
2. rm package-lock.json
3. npm i