在有人将此标记为重复之前,我已经尝试了所有发布的解决方案,并且我去过 GitHub 问题,在 StackOverflow 中,没有一个解决方案对我有用。
每当我尝试以角度生成任何东西时,它都会给我这个错误。这在我安装时开始,@angular/pwa
但不确定这是否完全是原因,因为我有一段时间没有在任何早期的应用程序中尝试过生成命令。我完全卸载了nodejs并重新安装了它,删除了所有的node_modules,包括全局的和本地的,所有这些都没有结果,请帮忙,因为我留下了复制组件和编辑它们,虽然不多,但感觉像是一项任务自己的。提前致谢。
编辑
这是我附加--debug
标志时出现的错误
An error occured:
Cannot read property 'entries' of undefined
TypeError: Cannot read property 'entries' of undefined
at new FilteredTree (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/@angular-devkit/schematics/src/tree/filtered.js:13:18)
at /media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/@angular-devkit/schematics/src/rules/base.js:82:22
at MergeMapSubscriber.input.pipe.operators_1.mergeMap.inputTree [as project] (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24)
at MergeMapSubscriber._tryNext (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
at MergeMapSubscriber._next (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/Subscriber.js:68:18)
at Observable._subscribe (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/observable/scalar.js:6:20)
at Observable._trySubscribe (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/Observable.js:43:25)
at Observable.subscribe (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/Observable.js:29:22)
at MergeMapOperator.call (/media/hamisi/New Volume/Work Projects/diaspora-selfcare-portal/frontend/node_modules/rxjs/internal/operators/mergeMap.js:39:23)
这就是我跑步时得到的ng -v
Angular CLI: 6.2.1
Node: 10.10.0
OS: linux x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 0.6.8
@angular/cli 6.2.1
@angular/pwa 0.6.8
@ngtools/webpack 6.1.5
@schematics/angular 0.6.8
@schematics/update 0.8.1
rxjs 6.3.2
typescript 2.7.2
webpack 4.9.2