NGCC Error: Node does not exist
See original GitHub issueπ bug report
Affected Package
Is this a regression?
No
Description
Node does not exist
error is thrown by NGCC
when a direct or transitive dependency of a module that is being processed is missing.
For example in the reproduction, when trying to process @angular/material/progress-bar
it is failing, because this depends on @angular/material/core
, and the later on @angular/cdk
. But @angular/cdk
is not installed.
The error itself is not self explanatory and might send users on a goose chase. Hence, we should handle missing dependencies more gracefully and hint the users which is the missing dependency.
π¬ Minimal Reproduction
https://github.com/alan-agius4/ngcc-node-error/tree/master
π₯ Exception or Error
throw new Error('Node does not exist: ' + node);
^
Error: Node does not exist: /workspace/ngcc-node-error/node_modules/@angular/material/progress-bar
at DepGraph.dependenciesOf (/workspace/ngcc-node-error/node_modules/dependency-graph/lib/dep_graph.js:187:13)
at DependencyResolver.sortEntryPointsByDependency (/workspace/ngcc-node-error/node_modules/@angular/compiler-cli/ngcc/src/packages/dependency_resolver.js:42:47)
at EntryPointFinder.findEntryPoints (/workspace/ngcc-node-error/node_modules/@angular/compiler-cli/ngcc/src/packages/entry_point_finder.js:37:34)
at Object.mainNgcc [as process] (/workspace/ngcc-node-error/node_modules/@angular/compiler-cli/ngcc/src/main.js:50:34)
at Object.<anonymous> (/workspace/ngcc-node-error/index.js:4:6)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! Test failed. See above for more details.
π Your Environment
Angular Version:
8.0.0-beta.10
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Angular 9 - NGCC fails with an unhandled exception
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once. You...
Read more >Angular compiler options
When true , the compiler does not look at the TypeScript version and does not report an error when an unsupported version of...
Read more >Fails to build with NGCC | Angular - EJ 2 Forums | Syncfusion
The cause for the reported issue is Syncfusion angular library is published in a minified format, which cannot be compiled for Ivy consumptionΒ ......
Read more >[Solved]-ERROR Ionic serve does eject unhandled exeption
[Solved]-ERROR Ionic serve does eject unhandled exeption: NGCC failed-angular.js ... subscribe does not exist on type 'number' error in Ionic Angular app?
Read more >The Angular linker (goodbye ngcc!) - Ninja Squad
This intermediate transformation can be shipped to NPM. When used in an Ivy project, ngcc will not have to transform the library: the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have got the same issue with ngx-highlightjs:
(8.2.0-rc.0)
We should handle this better. There is logic in ngcc to cope with this but it is obviously not working correctly in this case.