question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:15

github_iconTop GitHub Comments

8reactions
sergii-luchkocommented, Sep 4, 2018

@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.

3reactions
martinbdzcommented, Aug 20, 2018

I think this might be a duplicate of the issue #11885.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'entries' of undefined - Angular CLI
I tried the most repeated solution: reinstalling nodejs and angular cli, deleting node_modules and running npm i , but it did not work....
Read more >
How to Prevent the Error: Cannot Read Property '0' of Undefined
If a property of an object is an array, it's possible to accidentally misspell the key or try to access the array through...
Read more >
JavaScript Error: Cannot read property entries of undefined
It shows me this error. Cannot read property 'entries' of undefined. // THIS MARGIN DECIDES HOW CLOSE FROM A ROUTE ORIG/DEST-POINT NEEDS TO...
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
ERROR in Cannot read property 'length&#38
Can you give more information about this: ERROR in Cannot read property 'length' of undefined ? Try to update "screenfull": "^3.3.0" to latest...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found