Title: `--conditions xxx` cannot pass into `worker_thread` · Issue #50885 · nodejs/node · GitHub
Open Graph Title: `--conditions xxx` cannot pass into `worker_thread` · Issue #50885 · nodejs/node
X Title: `--conditions xxx` cannot pass into `worker_thread` · Issue #50885 · nodejs/node
Description: Version v20.10.0 Platform Darwin Alexs-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64 Subsystem module What steps will reproduce the bug? // main.js imp...
Open Graph Description: Version v20.10.0 Platform Darwin Alexs-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64 Subsystem module What step...
X Description: Version v20.10.0 Platform Darwin Alexs-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64 Subsystem module What step...
Opengraph URL: https://github.com/nodejs/node/issues/50885
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`--conditions xxx` cannot pass into `worker_thread`","articleBody":"### Version\r\n\r\nv20.10.0\r\n\r\n### Platform\r\n\r\nDarwin Alexs-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64\r\n\r\n### Subsystem\r\n\r\nmodule\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```js\r\n// main.js\r\nimport { Worker } from 'node:worker_threads'\r\n\r\nnew Worker(new URL('worker.js', import.meta.url), {\r\n execArgv: ['--conditions', 'react-server']\r\n})\r\n```\r\n\r\n```js\r\n// worker.js\r\nimport { register } from 'node:module'\r\n\r\nregister('./register.js', import.meta.url)\r\n\r\nconsole.log('1')\r\n\r\nimport('./test.js')\r\n```\r\n\r\n```js\r\n// register.js\r\nexport async function resolve (specifier, context, nextResolve) {\r\n // Take an `import` or `require` specifier and resolve it to a URL.\r\n console.log('context', context.conditions)\r\n return nextResolve(specifier, context, nextResolve)\r\n}\r\n\r\nexport async function load (url, context, nextLoad) {\r\n return nextLoad(url, context, nextLoad)\r\n}\r\n```\r\n\r\n```js\r\n// test.js\r\nconsole.log('3')\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\n_No response_\r\n\r\n### What is the expected behavior? Why is that the expected behavior?\r\n\r\n```\r\n1\r\ncontext [ 'node', 'import', 'node-addons', 'react-server' ]\r\n3\r\n```\r\n\r\n### What do you see instead?\r\n\r\n```shell\r\n1\r\ncontext [ 'node', 'import', 'node-addons' ]\r\n3\r\n```\r\n\r\n### Additional information\r\n\r\nMight cause RSC bundle issue https://github.com/dai-shi/waku/pull/178","author":{"url":"https://github.com/himself65","@type":"Person","name":"himself65"},"datePublished":"2023-11-23T20:14:50Z","url":"https://github.com/nodejs/node/issues/50885"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:284c8d7f-93e8-a72c-6271-e6741442de16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0E0:23B17C:5CBDCD:7EE616:6AED8AD0 |
| html-safe-nonce | c25947d545353e20afd847c58a9c1720afa7c978a246093f5d007de713af30a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEUwOjIzQjE3Qzo1Q0JEQ0Q6N0VFNjE2OjZBRUQ4QUQwIiwidmlzaXRvcl9pZCI6IjM2ODA1OTI3OTA0MDQ1NjU3MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1601d76b1c0addb3ecad0e715759cdefb6e054a91c6a35b9f04db9449cb64fef |
| hovercard-subject-tag | issue:2008750471 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/50885/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a851c9f84b1b9df0db1829e8f4c87b5dc2c4d67199648c9c2c73704ed475164e/nodejs/node/issues/50885 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a851c9f84b1b9df0db1829e8f4c87b5dc2c4d67199648c9c2c73704ed475164e/nodejs/node/issues/50885 |
| og:image:alt | Version v20.10.0 Platform Darwin Alexs-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64 Subsystem module What step... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | himself65 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width