angular: Ivy (9.1.5) causes build failure
🐞 bug report
Affected Package
The issue is caused by package @angular/compiler-cli (ngcc)Is this a regression?
Yes, the previous version in which this bug was not present was: `9.1.0`Description
In JIT mode build fails with File name ‘node_modules/apollo-angular/selectpipe.d.ts’ differs from already included file name ‘node_modules/apollo-angular/SelectPipe.d.ts’ only in casing In AOT mode build fails with Symbol SelectPipe declared in * is not exported from apollo-angular
🔬 Minimal Reproduction
Clone https://github.com/n9niwas/ngccbug Run
yarn
yarn start
🔥 Exception or Error
ERROR in node_modules/apollo-angular/ApolloModule.d.ts:4:25 - error TS1149: File name '/Users/blah/Documents/ngrepros/ngccbug/node_modules/apollo-angular/selectpipe.d.ts' differs from already included file name '/Users/blah/Documents/ngrepros/ngccbug/node_modules/apollo-angular/SelectPipe.d.ts' only in casing.
4 import * as ɵngcc1 from './selectpipe';
Also if I enable aot
the error is different:
ERROR in Symbol SelectPipe declared in /Users/blah/Documents/ngrepros/ngccbug/node_modules/apollo-angular/selectpipe.d.ts is not exported from apollo-angular (import into /Users/blah/Documents/ngrepros/ngccbug/src/app/app.component.ts)
This was also working fine in 9.1.0
🌍 Your Environment
Angular Version:
Angular CLI: 9.1.4
Node: 13.11.0
OS: darwin x64
Angular: 9.1.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.901.4
@angular-devkit/build-angular 0.901.4
@angular-devkit/build-optimizer 0.901.4
@angular-devkit/build-webpack 0.901.4
@angular-devkit/core 9.1.4
@angular-devkit/schematics 9.1.4
@angular/cli 9.1.4
@ngtools/webpack 9.1.4
@schematics/angular 9.1.4
@schematics/update 0.901.4
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0
Anything else relevant?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 25 (8 by maintainers)
Links to this issue
Commits related to this issue
- fix(compiler-cli): ensure LogicalFileSystem maintains case in paths The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- fix(compiler-cli): ensure LogicalFileSystem maintains case in paths The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure reflection tests are not brittle to case-sensitivity (#36968)" This reverts commit dcf1dcb757d523bb2347fb7dfecb5985a1106ed7. The changes to the case-sensitivity ha... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure partial-evaluator tests are not brittle to case-sensitivity (#36968)" This reverts commit c6e5225ec346b894d1890cb1e320dca7deeb6615. The changes to the case-sensiti... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure indexer tests are not brittle to case-sensitivity (#36968)" This reverts commit 3361f59a4f26c181f22dfe6181592f82ec115798. The changes to the case-sensitivity handl... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): use CompilerHost to ensure canonical file paths (#36968)" This reverts commit 7e9d5f5e826ee80b60d6f6e6e5d17dc94cb491c3. The changes to the case-sensitivity handling in #36... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): normalize mock Windows file paths correctly (#36968)" This reverts commit 654868f5840597b16adf9ff7f71d0e9f32f04946. The changes to the case-sensitivity handling in #36968 ... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): ensure `MockFileSystem` handles case-sensitivity (#36968)" This reverts commit b6c042d0a35b977fc1ab51827805b73dfceefabb. The changes to the case-sensitivity handling in #3... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): `isCaseSensitive()` returns correct value (#36968)" This reverts commit 4becc1bc9531b79e0d834e453981655897571bdf. The changes to the case-sensitivity handling in #36968 ca... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): ensure `getRootDirs()` handles case-sensitivity (#36968)" This reverts commit 5bddeea559754283d6f51741741a313f8f4c20be. The changes to the case-sensitivity handling in #36... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): ensure LogicalFileSystem handles case-sensitivity (#36968)" This reverts commit 65337fb8b8d9d16407c182af935dd737beaea7dd. The changes to the case-sensitivity handling in #... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): fix case-sensitivity issues in NgtscCompilerHost (#36968)" This reverts commit 4abd60361a7f27305c5add4f14927caf63482af3. The changes to the case-sensitivity handling in #3... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- fix(compiler-cli): ensure LogicalFileSystem maintains case in paths The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- fix(compiler-cli): ensure LogicalFileSystem maintains case in paths The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- fix(compiler-cli): ensure LogicalFileSystem maintains case in paths The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import... — committed to petebacondarwin/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure reflection tests are not brittle to case-sensitivity (#36968)" (#37003) This reverts commit dcf1dcb757d523bb2347fb7dfecb5985a1106ed7. The changes to the case-sensi... — committed to angular/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure partial-evaluator tests are not brittle to case-sensitivity (#36968)" (#37003) This reverts commit c6e5225ec346b894d1890cb1e320dca7deeb6615. The changes to the cas... — committed to angular/angular by petebacondarwin 4 years ago
- Revert "test(compiler-cli): ensure indexer tests are not brittle to case-sensitivity (#36968)" (#37003) This reverts commit 3361f59a4f26c181f22dfe6181592f82ec115798. The changes to the case-sensitiv... — committed to angular/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): use CompilerHost to ensure canonical file paths (#36968)" (#37003) This reverts commit 7e9d5f5e826ee80b60d6f6e6e5d17dc94cb491c3. The changes to the case-sensitivity handli... — committed to angular/angular by petebacondarwin 4 years ago
- Revert "fix(compiler-cli): normalize mock Windows file paths correctly (#36968)" (#37003) This reverts commit 654868f5840597b16adf9ff7f71d0e9f32f04946. The changes to the case-sensitivity handling i... — committed to angular/angular by petebacondarwin 4 years ago
@xiaotaoliu - for now roll-back your Angular versions to 9.1.4. You can do this by changing all the
@angular/...
framework packages in yourpackage.json
to 9.1.4.E.g.
And then re-installing your dependencies (i.e.
yarn
ornpm install
).Thanks for the reproduction @n9niwas. It made all the difference!
I have found the problem. It is a bug in ngcc.
During processing ngcc is spotting that the operating system is case-insensitive and then adding imports to files with canonical paths. E.g.
Note that there are two imports to the same file:
The first is from the original file. The second is added by ngcc.
Working on a fix.
We have just released 9.1.6 which should not have this problem. Please test.
@simonua Thanks a lot…It worked.