Skip to content

just init ERR_MODULE_NOT_FOUND #1251

@jong-kyung

Description

@jong-kyung

Describe the bug

just init fails with ERR_MODULE_NOT_FOUND because justfile line 21 runs node packages/tools/src/index.ts sync-remote directly. Node.js cannot resolve .js extension imports (e.g. import('./sync-remote-deps.js')) to .ts files without a TypeScript loader.

The correct entry point is packages/tools/src/bin.js, which registers @oxc-node/core/register before importing index.ts.

Reproduction

Clone the repo and run: just init

Steps to reproduce

  1. git clone the repo
  2. Run just init
  3. Observe ERR_MODULE_NOT_FOUND for sync-remote-deps.js

System Info

Node.js v22.18.0
just 1.48.1

Used Package Manager

pnpm

Logs

node packages/tools/src/index.ts sync-remote
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/.../packages/tools/src/sync-remote-deps.js' imported from /Users/.../packages/tools/src/index.ts

Validations

Metadata

Metadata

Assignees

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions