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.

Ivy (9.1.5) causes build failure

See original GitHub issue

🐞 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?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
petebacondarwincommented, May 8, 2020

@xiaotaoliu - for now roll-back your Angular versions to 9.1.4. You can do this by changing all the @angular/... framework packages in your package.json to 9.1.4.

E.g.

  "dependencies": {
    "@angular/animations": "9.1.4",
    "@angular/cdk": "^9.2.2",
    "@angular/common": "9.1.4",
    "@angular/compiler": "9.1.4",
    "@angular/core": "9.1.4",
    "@angular/elements": "9.1.4",
    "@angular/forms": "9.1.4",
    "@angular/material": "^9.2.2",
    "@angular/platform-browser": "9.1.4",
    "@angular/platform-browser-dynamic": "9.1.4",
    "@angular/router": "9.1.4",
    "@angular/service-worker": "9.1.4",
    ...
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "0.901.4",
    "@angular/cli": "9.1.4",
    "@angular/compiler-cli": "9.1.4",
    "@angular/language-service": "9.1.4",
    ...

And then re-installing your dependencies (i.e. yarn or npm install).

7reactions
petebacondarwincommented, May 8, 2020

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.

import { Apollo } from './Apollo';
import { SelectPipe } from './SelectPipe';
import * as Ι΅ngcc0 from '@angular/core';
import * as Ι΅ngcc1 from './selectpipe';
export declare const PROVIDERS: (typeof Apollo)[];
export declare const DECLARATIONS: (typeof SelectPipe)[];
export declare class ApolloModule {
    static Ι΅mod: Ι΅ngcc0.Ι΅Ι΅NgModuleDefWithMeta<ApolloModule, [typeof Ι΅ngcc1.SelectPipe], never, [typeof Ι΅ngcc1.SelectPipe]>;
    static Ι΅inj: Ι΅ngcc0.Ι΅Ι΅InjectorDef<ApolloModule>;
}

Note that there are two imports to the same file:

import { SelectPipe } from './SelectPipe';
import * as Ι΅ngcc1 from './selectpipe';

The first is from the original file. The second is added by ngcc.

Working on a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 application build fails when working with linked ...
I ask because the only way I've successfully linked (and watched changes) in a library in a 9/10 version is by turning ivy...
Read more >
Release Notes β€” Axon.ivy Digital Business Platform 9.1 ...
... Release Notes Axon.ivy 9.1.1 (Weissfluh) ... always PopUp when ivyEngines are started + XIVY-4031 Bug Unexpected error when creating new APP +...
Read more >
Spring Boot Reference Documentation
It is possible to build a Spring Boot project using Apache Ant+Ivy. ... But it may also lead to application code inconsistency and...
Read more >
FortiNAC 9.1.8 Release Notes - Amazon AWS
New Features in 9.1.5 ... Upgrade failed due to: Operation CREATE USER failed for nac@localhost ... cause Endpoint Compliance scan failures.
Read more >
Release Notes | FortiNAC 9.1.8
708671, Resync interfaces scheduled task for modeled FortiGate causes FortiGate SSL VPN ... 709544, Eclipse environment error with non-jar ivy artifacts.
Read more >

github_iconTop Related Medium Post

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