Repository navigation
Closed
Description
🐞 bug report
Affected Package
@angular/compiler-cli@8.2.2 (ivy)
Is this a regression?
Yes (relative to non-ivy)
Description
I'm using pnpm which creates a very strict node_modules hierarchy where packages cannot see any dependencies which are not declared in their manifest. Many Angular packages assume undeclared peerDependencies. When compiling with ivy, this manifests as an error like the one described in #29624.
The problem is the error doesn't say what dependencies are missing. I am able to work around this by modifying DependencyResolver.prototype.sortEntryPointsByDependency to log the dependency graph which includes the invalid nodes.
🔬 Minimal Reproduction
Create a new angular project with pnpm without shamefully-flatten and attempt to ng build it.
🔥 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. (/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:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.2.1
Node: 10.16.0
OS: darwin x64
Angular: 8.2.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect
@angular-devkit/build-angular 0.802.1
@angular-devkit/core
@angular-devkit/schematics
@angular/cdk 7.3.7
@angular/cli 8.2.1
@angular/material 7.3.7
@schematics/angular
@schematics/update
rxjs 6.5.2
typescript 3.5.3
Anything else relevant? Nope
Metadata
Metadata
Assignees
Labels
No labels
Activity
JoostK commentedon Aug 27, 2019
@aquark Thanks for trying Ivy and reporting the issues you experience. This particular error should have been resolved in #31872, which is only included in the 9.0.0-next releases. Could you please test with the latest release tagged
next, which is the most up-to-date regarding Ivy fixes.Closing for now as I believe this should have been fixed, if you experience otherwise after upgrading please comment here and I can reopen. Thanks again!
angular-automatic-lock-bot commentedon Sep 27, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.