Title: `node --loader` for REPL (without entrypoint) does not execute loader · Issue #33435 · nodejs/node · GitHub
Open Graph Title: `node --loader` for REPL (without entrypoint) does not execute loader · Issue #33435 · nodejs/node
X Title: `node --loader` for REPL (without entrypoint) does not execute loader · Issue #33435 · nodejs/node
Description: Version: 14.2.0 Platform: Ubuntu 16.04.6 Subsystem: ESM loader hooks, REPL What steps will reproduce the bug? cat 'console.log("hooks executing")' > hooks.mjs node --loader ./hooks.mjs # At the REPL prompt: > import("http://example.com/f...
Open Graph Description: Version: 14.2.0 Platform: Ubuntu 16.04.6 Subsystem: ESM loader hooks, REPL What steps will reproduce the bug? cat 'console.log("hooks executing")' > hooks.mjs node --loader ./hooks.mjs # At the REP...
X Description: Version: 14.2.0 Platform: Ubuntu 16.04.6 Subsystem: ESM loader hooks, REPL What steps will reproduce the bug? cat 'console.log("hooks executing")' > hooks.mjs node --loader ./h...
Opengraph URL: https://github.com/nodejs/node/issues/33435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`node --loader` for REPL (without entrypoint) does not execute loader","articleBody":"* **Version**: 14.2.0\r\n* **Platform**: Ubuntu 16.04.6\r\n* **Subsystem**: ESM loader hooks, REPL\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```\r\ncat 'console.log(\"hooks executing\")' \u003e hooks.mjs\r\nnode --loader ./hooks.mjs\r\n# At the REPL prompt:\r\n\u003e import(\"http://example.com/foo\")\r\n```\r\n\r\nThe message \"hooks executing\" is never written to stdout, indicating that `hooks.mjs` is never executed, even though the ESM resolve hook should be invoked to handle our `import()` call.\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nAlways\r\n\r\n### What is the expected behavior?\r\n\r\nWhen launching the node REPL with `--loader` flag, the loader hooks are executed.\r\n\r\n### What do you see instead?\r\n\r\nLoader hook file is not executed.\r\n\r\n### Additional information\r\n\r\n\u003c!--\r\nTell us anything else you think we should know.\r\n--\u003e\r\n","author":{"url":"https://github.com/cspotcode","@type":"Person","name":"cspotcode"},"datePublished":"2020-05-16T12:39:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/33435/node/issues/33435"}
| 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:25cd0023-f065-3103-ad09-10fd23ebea3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 950A:1F54B4:6494C:87DA2:6992F3A4 |
| html-safe-nonce | 6b8d8c3594c81bd62d783f13984da81a8d6679c22a6b588e7d5fab3a96c8899b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTBBOjFGNTRCNDo2NDk0Qzo4N0RBMjo2OTkyRjNBNCIsInZpc2l0b3JfaWQiOiIzMDg2NzIxMTIxMTI4NzM5NzQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4fe44492a53beb2810c4edd062e80d188e3296dbaa2cb004daf6305d79f4d085 |
| hovercard-subject-tag | issue:619464669 |
| 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/33435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7790bf60a454b2484cd88be9abf3f3c2f2ce28f1255fa153f4598dbc6b53db7e/nodejs/node/issues/33435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7790bf60a454b2484cd88be9abf3f3c2f2ce28f1255fa153f4598dbc6b53db7e/nodejs/node/issues/33435 |
| og:image:alt | Version: 14.2.0 Platform: Ubuntu 16.04.6 Subsystem: ESM loader hooks, REPL What steps will reproduce the bug? cat 'console.log("hooks executing")' > hooks.mjs node --loader ./hooks.mjs # At the REP... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cspotcode |
| hostname | github.com |
| expected-hostname | github.com |
| None | 348cc0594c4976eb4050dc9547ecf65057ee89a2b7ed0652b983b9b539f57145 |
| 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 | ce72317238c729e85014e1d867fd30d09b7f94ba |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width