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.

NGCC Error: Node does not exist

See original GitHub issue

🐞 bug report

Affected Package

@angular/compiler-cli

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:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
qaxqaxqaxcommented, Jul 30, 2019

I have got the same issue with ngx-highlightjs:

ERROR in Node does not exist: /Users/localadmin/D/restructure/webclients/node_modules/ngx-highlightjs

(8.2.0-rc.0)

1reaction
petebacondarwincommented, Apr 1, 2019

We should handle this better. There is logic in ngcc to cope with this but it is obviously not working correctly in this case.

Read more comments on GitHub >

github_iconTop 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 >

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