Skip to content

fix(init): use bin.js entry point for TypeScript loader in justfile#1252

Merged
fengmk2 merged 3 commits intovoidzero-dev:mainfrom
hamsurang:fix/just-init-module-not-found
Apr 1, 2026
Merged

fix(init): use bin.js entry point for TypeScript loader in justfile#1252
fengmk2 merged 3 commits intovoidzero-dev:mainfrom
hamsurang:fix/just-init-module-not-found

Conversation

@jong-kyung
Copy link
Copy Markdown
Contributor

@jong-kyung jong-kyung commented Apr 1, 2026

Summary

Closes #1251

  • just init fails with ERR_MODULE_NOT_FOUND because node packages/tools/src/index.ts runs without a TypeScript loader, so Node.js cannot resolve .js imports to .ts files
  • Changed to node packages/tools/src/bin.js which registers @oxc-node/core/register before importing index.ts, enabling proper .js.ts resolution

`just init` fails because `node packages/tools/src/index.ts` runs
without a TypeScript loader, so Node.js cannot resolve `.js` imports
to `.ts` files. Use `bin.js` which registers `@oxc-node/core/register`
before importing `index.ts`.
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 27abf7d
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69cccc5c74418d000802dab6

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 1, 2026

@jong-kyung should merge changes from main branch first
image

@jong-kyung
Copy link
Copy Markdown
Contributor Author

@jong-kyung should merge changes from main branch first image

I've merged it! Thank you for reviewing

@fengmk2 fengmk2 merged commit ced26cd into voidzero-dev:main Apr 1, 2026
32 checks passed
init: _clean_dist
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear dprint taplo-cli -y
node packages/tools/src/index.ts sync-remote
node packages/tools/src/bin.js sync-remote
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jong-kyung This change will cause problems, as the "@oxc-node/core" dependency is not installed during the initialization phase. Since we declared that the node version supports running ts directly, the original node packages/tools/src/index.ts sync-remote is correct. I will revert this change first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the reason for your modification. Tools should be changed to a pure TypeScript project. Let me refactor it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

just init ERR_MODULE_NOT_FOUND

2 participants