Like giving a delivery address for the finished building, not the construction site — the .ts is the site, .js is the address.
With NodeNext, TypeScript follows Node.js ESM rules: explicit .js extensions required. You write "./utils.js" but TypeScript finds "./utils.ts".
> import from "./utils.js" → TypeScript finds utils.ts ✓ > import from "./utils" → Error: no extension (NodeNext) > import from "./utils.ts" → Error: use .js not .ts
Like giving a delivery address for the finished building, not the construction site — the .ts is the site, .js is the address.
With NodeNext, TypeScript follows Node.js ESM rules: explicit .js extensions required. You write "./utils.js" but TypeScript finds "./utils.ts".
> import from "./utils.js" → TypeScript finds utils.ts ✓ > import from "./utils" → Error: no extension (NodeNext) > import from "./utils.ts" → Error: use .js not .ts
Sign in to cast your vote
Sign in to share your feedback and join the discussion.