Cannot read property 'entries' of undefined
See original GitHub issue[x ] bug report I am submitting this as a bug because there is no clear and definitive answer on how to troubleshoot this issue. It seems to be effecting developers in different ways and / or for different reasons.
Command
- [ x] generate
Versions
npm --version 5.6.0 macOS --version High Sierra Angular CLI: 6.1.4 Node: 8.11.4 OS: darwin x64 Angular: 6.1.3 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router, service-worker
Package Version
@angular-devkit/architect 0.6.8 @angular-devkit/build-angular 0.6.8 @angular-devkit/build-optimizer 0.6.8 @angular-devkit/core 0.6.8 @angular-devkit/schematics 0.6.8 @angular/cli 6.1.4 @angular/pwa 0.6.8 @ngtools/webpack 6.0.8 @schematics/angular 0.6.8 @schematics/update 0.7.4 rxjs 6.2.2 typescript 2.9.2 webpack 4.8.3
Repro steps
ng generate
command fails for all types component
, module
, etc, with the following dreaded error:
Cannot read property 'entries' of undefined
with the debug flag, i am seeing this: at new FilteredTree (/Users/mike/myapp/node_modules/@angular-devkit/schematics/src/tree/filtered.js:13:18)
Maybe it is worth digging into @angular-devkit to figure this out myself. 😕
Mention any other details that might be useful
I have already tried removing the node_modules
directory and re-installing.
Also tried removing node, npm and angular-cli
all together followed by clean installs of each.
In my particular case…
Important to note, that ng serve
and ng build
are functioning correctly despite the problem with generate
.
Also, generating a new project works, as well as using generate
within the new project directory OK, so where do i begin to troubleshoot this issue in my existing project?
ANY help greatly appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:15
@gitdisrupt , I had the same issue, I tried to update @angular/pwa package to version ~0.7.5, and this resolved the problem for me.
I think this might be a duplicate of the issue #11885.