-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Passing in V8 flags to a node process that executes ng build/serve throws #28901
Comments
Thank you for the report. This is something the team will be investigating. For |
@clydin Yeah you're right, I don't need the One exception is with |
I've this problem with |
This commit removes the use of a worker for Babel transformation of external dependencies within the ESM loader hook. Closes angular#28901
Unfortunately,
We've also seen the following, that seems to happen randomly:
Saw that PR #29118 by @alan-agius4 is Closed, can you please give us an update? |
Command
build
Is this a regression?
The previous version in which this bug was not present was
18.2.12
Description
I am firing a
nodejs
process that executes theng build
schematic.For example, it looks something like this -
node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng build
. This throws because of the--max-old-space-size
V8 flag that I pass in tonode
.I traced the problem to this PR#28758 which uses
process.execArgv
and passes them in asexecArgv
to theoptions
of the newly-created worker. Later onpiscina
will spawn a worker with the provided options, without doing any filtering, but I figured this is the intended behavior on their part.According to
nodejs
when spawning worker threads, we cannot pass in any V8 flags (ref). Also, there's an open issue nodejs/node#41103 to make worker threads stop throwing errors for unsupported options but until that is resolved my best guess is that ifprocess.execArgv
is to be used, then some sort of filtering should be applied on these options before passing them in to the worker's constructor.Minimal Reproduction
1, Create a new application with
@angular/cli@19
.2. Navigate to the newly-created project's root.
3. Run
node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng build
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: