Skip to content
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

wrong source map path generated by ng build #45070

Closed
1 of 15 tasks
UchihaYuki opened this issue Feb 14, 2022 · 2 comments
Closed
1 of 15 tasks

wrong source map path generated by ng build #45070

UchihaYuki opened this issue Feb 14, 2022 · 2 comments

Comments

@UchihaYuki
Copy link

🐞 Bug report

Command (mark with an x)

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

Description

I shipped my own angular libraries with typescript source code and source map, then consume it in a regular angular app. after run ng build, I observed the following item in vendor.js.map's sources property:

./node_modules/@myname/mylib/__ivy_ngcc__/src/lib/alert/alert.service.ts

which doesn't exist on my disk at all.

🌍 Your Environment


Angular CLI: 11.2.18
Node: 16.13.1
OS: win32 x64
OS: win32 x64
OS: win32 x64

Angular: 11.2.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.18
@angular-devkit/build-angular   0.1102.18
@angular-devkit/core            11.2.18
@angular-devkit/schematics      11.2.18
@angular/cli                    11.2.18
@schematics/angular             11.2.18
@schematics/update              0.1102.18
rxjs                            6.6.7
typescript                      4.0.8

@alan-agius4
Copy link
Contributor

The is caused by NGCC which is needed for Angular libraries that have been compiled with older versions of Angular. NGCC is no longer needed when compiled with Angular 13+.

That said, in general it is not expected that TypeScript sources are included in node_modules See: angular/angular-cli#22701

Closing as NGCC doesn't support such a library setup.

@alan-agius4 alan-agius4 transferred this issue from angular/angular-cli Feb 14, 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 Mar 17, 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