angular-cli: Using ng12 partial lib and source map causing build memory exception

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Worked with full ivy libs. Stopped working with partial ivy libs

Description

I have an app with the following source map settings:

            "sourceMap": {
              "scripts": true,
              "styles": true,
              "vendor": true
            },

I updated to angular 12 and changed my lib (that my app is using) to build using partial ivy. Now I get memory exception when building the app. It works with my lib in full ivy.

Changing the vendor property above to false will make it build. But I need the vendor script debugging, i.e. for it to be true.

🔬 Minimal Reproduction

See above

🔥 Exception or Error


FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF713284C9F napi_wrap+111007
 2: 00007FF713228226 v8::base::CPU::has_sse+59910
 3: 00007FF713229126 node::OnFatalError+294
 4: 00007FF713B02ABE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF713AE788D v8::SharedArrayBuffer::Externalize+781
 6: 00007FF7139909DC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516
 7: 00007FF71399BDFA v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258
 

🌍 Your Environment


Angular CLI: 12.2.5
Node: 14.17.6
Package Manager: yarn 1.22.5
OS: win32 x64

Angular: 12.2.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.5
@angular-devkit/build-angular   12.2.5
@angular-devkit/core            12.2.5
@angular-devkit/schematics      12.2.5
@schematics/angular             12.2.5
ng-packagr                      12.2.1
rxjs                            6.6.7
typescript                      4.3.5

Anything else relevant?

No

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 23 (2 by maintainers)

Most upvoted comments

I got the approval from my boss to host the app on a private shared repo. I will do that asap.

I can confirm this is working now 😃 Good job 👍