GithubHelp home page GithubHelp logo

Comments (3)

novathore avatar novathore commented on May 31, 2024 1

@gkalpak Is this repo is a good place for the issue? Or should I write it into angular/angular (ngcc is provided by compiler-cli which is package in angular/angular repo

from ngcc-validation.

petebacondarwin avatar petebacondarwin commented on May 31, 2024 1

I just looked into this.

The error occurs when ngtsc tries to compute add a reference that would force a new import for the file. It tries to compute the logical filesystem path to the imported file, but gets null because the source file is outside the rootDirs of the program.

I believe the issue is that for libraries such as CDK the source files can be in a different tree to the entry-point path. In the case of CdkAccordion the entry-point path is node_modules/@angular/cdk/accordion but the ESM2015 source code is in node_modules/@angular/cdk/esm2015/accordion.

It appears that ngcc is incorrectly setting the rootDirs of the program to be the entry-point path whereas it should be using the package path, since source files will always be inside the package path directory, while the may not be inside the entry-point path directory.

from ngcc-validation.

petebacondarwin avatar petebacondarwin commented on May 31, 2024 1

Should be fixed by angular/angular#34212

from ngcc-validation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.