We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
--require
--import
https://nodejs.org/api/cli.html#-r---require-module
There was a previous issue for this: #28518
But the PR to improve this does not make this clear in the right places: #31380
When using these args, it's important to understand their impact.
My understanding is that these arguments impact:
execArgv: []
child_process.fork()
cluster
As requested in the previous issues, this behaviour should really be documented under --require docs here: https://nodejs.org/api/cli.html#-r---require-module
and also for the --import docs here: https://nodejs.org/api/cli.html#--importmodule
It might also be worth linking to this warning from both of those args because this is information is key and hidden right at the bottom of the worker thread docs: https://nodejs.org/api/worker_threads.html#launching-worker-threads-from-preload-scripts
The text was updated successfully, but these errors were encountered:
Thanks for your suggestion!
I've opened a PR to fix this, and I've marked you as the Co-Author. If you would like me to change that, please let me know.
Co-Author
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Affected URL(s)
https://nodejs.org/api/cli.html#-r---require-module
Description of the problem
There was a previous issue for this:
#28518
But the PR to improve this does not make this clear in the right places:
#31380
When using these args, it's important to understand their impact.
My understanding is that these arguments impact:
execArgv: []
to optionschild_process.fork()
unless you passexecArgv: []
to optionscluster
module unless you pass `execArgv: [], to settingsAs requested in the previous issues, this behaviour should really be documented under
--require
docs here:https://nodejs.org/api/cli.html#-r---require-module
and also for the
--import
docs here:https://nodejs.org/api/cli.html#--importmodule
It might also be worth linking to this warning from both of those args because this is information is key and hidden right at the bottom of the worker thread docs:
https://nodejs.org/api/worker_threads.html#launching-worker-threads-from-preload-scripts
The text was updated successfully, but these errors were encountered: