Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Request: Backport loader fix to v22.x | GoodFirstPicks

Request: Backport loader fix to v22.x

nodejs/node 5 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeNode.jsJavaScript

Why this is a good first issue

Backporting a fix requires identifying the specific change and maintainer approval.

AI Summary

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.

Issue Description

Version

22.x

Platform

macOS 26.2 (arm64)
Node.js: v22.22.0
Package manager: npm 10.9.4

Subsystem

N/A

What steps will reproduce the bug?

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')

How often does it reproduce? Is there a required condition?

Node.js < v24.11.1

What is the expected behavior? Why is that the expected behavior?

No errors

What do you see instead?

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

Additional information

Potentially R

GitHub Labels

moduleloaders

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 15 points when you complete it!

Risk Flags

  • specific fix not identified
  • requires maintainer confirmation
Loading labels...

Details

Points15 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno