Backporting a fix requires identifying the specific change and maintainer approval.
The issue requests backporting a fix from v24.11.1 to v22.x, but the specific fix is not clearly identified. The contributor needs to pinpoint the exact change and get maintainer approval before proceeding. This involves understanding the loader hook customization changes in v24.11.1.
22.x
macOS 26.2 (arm64)
Node.js: v22.22.0
Package manager: npm 10.9.4
N/A
I would like to request a backport of the fix that resolved an issue in v24.11.1 to the v22.x release line.
We are currently experiencing an issue that was fixed in v24.11.1. However, our project is still supporting v22.x and would benefit from having this fix backported.
import module from 'node:module'
module.registerHooks({
load(url, context, defaultLoad) {
return defaultLoad(url, context)
},
})
await import('@intlify/unplugin-vue-i18n/vite')
Node.js < v24.11.1
No errors
node:internal/modules/esm/translators:152
return cjsCache.get(job.url).exports;
^
TypeError: Cannot read properties of undefined (reading 'exports')
at require (node:internal/modules/esm/translators:152:33)
at Object.getPkg (/private/tmp/tsdown_issue_example/node_modules/jsonc-eslint-parser/lib/parser/visitor-keys.js:40:28)
at loadNewest (/private/tmp/tsdown_issue_example/node_modules/jsonc-eslint-parser/lib/parser/modules/require-utils.js:73:26)
at getVisitorKeys (/private/tmp/tsdown_issue_example/node_modules/jsonc-eslint-parser/lib/parser/visitor-keys.js:21:51)
at Object.<anonymous> (/private/tmp/tsdown_issue_example/node_modules/jsonc-eslint-parser/lib/index.js:40:57)
at loadCJSModule (node:internal/modules/esm/translators:166:3)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:202:7)
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)
at async file:///private/tmp/tsdown_issue_example/start.js:10:1
Claim this issue to let others know you're working on it. You'll earn 15 points when you complete it!