New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ivy (9.1.5) causes build failure #36992
Comments
It also worked in 9.1.3 |
The build fails in 9.1.5 if Ivy is enabled. If it's not enabled, it succeed. |
Just had the same issue, 9.1.4 builds fine, but 9.1.5 gives the same issue with duplicated file names and incorrect casing. |
Probably related to #36968 |
Same issue with angulartics lib: angulartics/angulartics2#380 |
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. |
same issue i had this morning when i installed a clean version of angular 9 globally ERROR in TypeError: Cannot read property 'flags' of undefined "devDependencies": { Angular CLI: 9.1.4 i just did "ng new helloword" and after the project was created i tried "ng s -o" and threw the error above please help |
Nice, thanks for the quick help! |
so,
now I know it is a bug in ngcc. but how to fix it? My project still not work. |
Waiting for a fix or install previous angular version (previous than 9.1.5 in my case) |
@XIAOtaoliu - for now roll-back your Angular versions to 9.1.4. E.g.
And then re-installing your dependencies (i.e. |
this is a temporary fix ryt? |
@petebacondarwin |
My Angular versions are already pointing to 9.1.4.But its still failing. |
do this npm install @angular/core@9.1.4 @angular/animations@9.1.4 @angular/common@9.1.4 @angular/forms@9.1.4 @angular/platform-browser@9.1.4 @angular/router@9.1.4 @angular/platform-browser-dynamic@9.1.4 @angular/compiler@9.1.4 @angular/compiler-cli@9.1.4 @angular/language-service@9.1.4 |
@NamrataDG, you are using a tilde wildcard (e.g. "~9.1.4") which will install patch versions. 9.1.5 and 9.1.4 are both valid. Notice how petebacondarwin's versions are pinned explicitly to the versions to use ("9.1.4"). Once updated, run |
@simonua Thanks a lot..It worked. |
The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes angular#36992, angular#36993, angular#37000
The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes angular#36992, angular#36993, angular#37000
It appears, at least locally for me, that #37008 fixes the problem in https://github.com/n9niwas/ngccbug |
…o case-sensitivity (angular#36968)" This reverts commit dcf1dcb. The changes to the case-sensitivity handling in angular#36968 caused multiple projects to fail to build. See angular#36992, angular#36993 and angular#37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further.
…ittle to case-sensitivity (angular#36968)" This reverts commit c6e5225. The changes to the case-sensitivity handling in angular#36968 caused multiple projects to fail to build. See angular#36992, angular#36993 and angular#37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further.
…ase-sensitivity (angular#36968)" This reverts commit 3361f59. The changes to the case-sensitivity handling in angular#36968 caused multiple projects to fail to build. See angular#36992, angular#36993 and angular#37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further.
…ase-sensitivity (#36968)" (#37003) This reverts commit 3361f59. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…paths (#36968)" (#37003) This reverts commit 7e9d5f5. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
#36968)" (#37003) This reverts commit 654868f. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…tivity (#36968)" (#37003) This reverts commit b6c042d. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…36968)" (#37003) This reverts commit 4becc1b. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…ivity (#36968)" (#37003) This reverts commit 5bddeea. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…itivity (#36968)" (#37003) This reverts commit 65337fb. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
…erHost (#36968)" (#37003) This reverts commit 4abd603. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
We have just released 9.1.6 which should not have this problem. Please test. |
9.1.6 works for me, thanks for the quick turnaround! |
9.1.6 works for me also, thanks |
As @petebacondarwin mentioned, upgrading to 9.1.6 should fix the problem. Closing the issue now. In case the problem is still not resolved, feel free to open a new one. |
The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes angular#36992, angular#36993, angular#37000
This is back after upgrading to 9.1.7 |
Can you provide more details in a fresh issue please @webm0nk3y |
The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes angular#36992, angular#36993, angular#37000
…37008) The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes #36992, #36993, #37000 PR Close #37008
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ngular#37008) The work to support case-sensitivity in the `FileSystem` went too far with the `LogicalFileSystem`, which is used to compute import paths that will be added to files processed by ngtsc and ngcc. Previously all logical paths were canonicalised, which meant that on case-insensitive file-systems, the paths were all set to lower case. This resulted in incorrect imports being added to files. For example: ``` import { Apollo } from './Apollo'; import { SelectPipe } from './SelectPipe'; import * as ɵngcc0 from '@angular/core'; import * as ɵngcc1 from './selectpipe'; ``` The import from `./SelectPipe` is from the original file, while the import from `./selectpipe` is added by ngcc. This causes the TypeScript compiler to complain, or worse for paths not to be matched correctly. Now, when computing logical paths, the original absolute paths are matched against rootDirs in a canonical manner, but the actual logical path that is returned maintains it original casing. Fixes angular#36992, angular#36993, angular#37000 PR Close angular#37008
🐞 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
🔥 Exception or Error
Also if I enable
aot
the error is different:This was also working fine in
9.1.0
🌍 Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: