You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Runtime helpers resolve from the user's file, so a global oxnode fails with ERR_MODULE_NOT_FOUND #794
Lowered syntax imports runtime helpers from @oxc-node/core/helpers/*, and that bare specifier is resolved relative to the transformed file. It only works when @oxc-node/core is installed where that file can see it, so a global oxnode (the @oxc-node/cli README suggests "Install globally, you can use it replace node command anywhere") fails on the first class field.
Reproduction
npm install -g @oxc-node/[email protected], then in an empty directory:
HelperLoaderOptions { module_name: "@oxc-node/core", .. } (src/lib.rs#L741-L742) emits bare specifiers, and neither the resolve hook nor the pirates hook resolves them from @oxc-node/core itself.
Suggested fix
Resolve @oxc-node/core/helpers/* from the loader's own location: in the resolve hook with nextResolve(specifier, { ...context, parentURL: import.meta.url }), and in the CommonJS output with a require created for the loader's location instead of the file's.
Related: class fields, private members, and static blocks run natively on every supported Node.js, and using is native from Node.js 24, but they are always lowered (class_properties: Some(..), class_static_block: true, explicit_resource_management: true, L727-L737). Lowering them only when the semantics require it (useDefineForClassFields: false, legacy decorators) or the running Node.js lacks them would remove most helper imports, and keep stack traces and Function.prototype.toString() closer to the source.
Activity
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
build(oxc-node): sync the vendored source to v0.1.5
feat(vpx): run TypeScript scripts with the vendored oxc-node (#2936)