Skip to content

Don't confuse workers with no-opt command line option#9239

Merged
mischnic merged 1 commit into
parcel-bundler:v2from
danieltroger:dt/node_worker_fix
Sep 13, 2023
Merged

Don't confuse workers with no-opt command line option#9239
mischnic merged 1 commit into
parcel-bundler:v2from
danieltroger:dt/node_worker_fix

Conversation

@danieltroger

Copy link
Copy Markdown
Contributor

↪️ Pull Request

Maybe fixes #9237

💻 Examples

See #9237

🚨 Test instructions

You can try setting up docker and node like described in the discussion above. But I don't see how this could hurt? Let's just try it and maybe it works.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@mischnic

Copy link
Copy Markdown
Member

You can try setting up docker and node like described in the discussion above. But I don't see how this could hurt? Let's just try it and maybe it works.

Or: set NODE_OPTIONS="--opt" which something in your setup does

@danieltroger

danieltroger commented Sep 12, 2023

Copy link
Copy Markdown
Contributor Author

Or: set NODE_OPTIONS="--opt" which something in your setup does

I tried that, the problem is that it yields
/Users/daniel/.nvm/versions/node/v20.5.0/bin/node: --opt is not allowed in NODE_OPTIONS

And --no-opt

/Users/daniel/.nvm/versions/node/v20.5.0/bin/node: --no-opt is not allowed in NODE_OPTIONS

@mischnic

mischnic commented Sep 12, 2023

Copy link
Copy Markdown
Member

I guess it has be injected in some other way then, e.g. by overriding the node binary on PATH or

$ node --opt
Welcome to Node.js v18.17.1.
Type ".help" for more information.
> process.execArgv
[ '--opt' ]

@danieltroger

danieltroger commented Sep 12, 2023

Copy link
Copy Markdown
Contributor Author

I manipulated my path and the argument is there when running node

daniel@mmmmmmmmmm utilishared % node                   
Welcome to Node.js v20.5.0.
Type ".help" for more information.
> process.execArgv
[ '--no-opt' ]
> 

but yarn parcel build still succeeds for me (suggesting that the option is not respected).
However, I did this change with a yarn patch and now my Dockerfile seems to get further.

EDIT: yup, my docker image builds successfully now 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants