Skip to content

Could not read Angular module file: /src/@app/app.module.ts #23407

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

Closed
14 tasks
kasir-barati opened this issue Jun 20, 2022 · 2 comments
Closed
14 tasks

Could not read Angular module file: /src/@app/app.module.ts #23407

kasir-barati opened this issue Jun 20, 2022 · 2 comments

Comments

@kasir-barati
Copy link

kasir-barati commented Jun 20, 2022

Oh hi there! 😄

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • [:negative_squared_cross_mark:] add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

IDK but I guess it won't be working at all

🔬 Minimal Reproduction & Description

Add this in tsconfig.json: "paths":{ "@app/*": ["src/app/*"] } and then in the main.ts I imported like this.

🔥 Exception or Error


[kasir@kasir task-tracker-traversy-media]$ ng add @angular/material
Skipping installation: Package already installed
? Choose a prebuilt theme name, or "custom" for a custom theme: Purple/Green       [ Preview: 
https://material.angular.io?theme=purple-green ]
? Set up global Angular Material typography styles? Yes
? Include the Angular animations module? Include and enable animations
UPDATE package.json (1905 bytes)
✔ Packages installed successfully.
Could not read Angular module file: /src/@app/app.module.ts

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 14.0.2
Node: 18.2.0 (Unsupported)
Package Manager: pnpm 7.2.1 
OS: linux x64

Angular: 14.0.2
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.1
@angular-devkit/build-angular   14.0.2
@angular-devkit/core            14.0.1
@angular-devkit/schematics      14.0.1
@schematics/angular             14.0.1
rxjs                            7.5.5
typescript                      4.7.4
    
Warning: The current version of Node (18.2.0) is not supported by Angular.

Anything else relevant?

#11499

Temporary nutty as a fruitcake solution

Remove the config from tsconfig.json
image

@alan-agius4
Copy link
Collaborator

Duplicate of #12740

@alan-agius4 alan-agius4 marked this as a duplicate of #12740 Jun 20, 2022
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2022
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants