Skip to content

Paths decalred in compilerOptions tsconfig.app.json not working #17873

Description

@alexmtzs

I have already seen some issues related with this topic here but any one can fix my issue..

CONTEXT OF THE ISSUE:
It is curios i have similar setup in other project and it is working perfect. As context of how i got on this, I'm trying to do a merge between ASP .Net Boilerplate but replaing the front with ngx-admin.

Original project uses only main tsconfig.json file in source. Ngx-admin uses tsconfig.json main folder and tsconfig.app.json and tsconfig.spec.json in src folder. As well as tsconfig.e2e.json in e2e folder.
All was perfect until i started merging this files.

So, I created and attached a smaill brand new repro project:

STEPS TO DUPLICATE

  1. Download the attached project
  2. Run npm install
  3. Open src/AppPreBootstrap.ts file
  4. BUG: You will see that the import to AppConsts class does not work as @shared/AppConsts is not recognized.
  5. BUG: Try to retype @sha and intellisense does not bring the option to add @shared........
  6. Optionally you can run ng serve, But in this project this issue does not affect the compilation but warning about classes not used.
    DuplicateTsConfigissue.zip
    ErrorTSCONFIG

Activity

  1. alan-agius4 commented on Jun 8, 2020

    @alan-agius4
    Collaborator

    Hi @alexmtzs, this is a duplicate of #8138 and was addressed in version 10 via #17586.

    The fix requires TypeScript 3.9 which leverages the usage of the new "solutions style" tsconfig files. You can read about this here https://devblogs.microsoft.com/typescript/announcing-typescript-3-9-rc/#solution-style-tsconfig

  2. angular-automatic-lock-bot commented on Jul 9, 2020

    @angular-automatic-lock-bot

    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.

  3. locked and limited conversation to collaborators on Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions