# tsc 5.9.3 moduleResolution node16: import './y' -> error TS2835: Relative import paths need explicit file extensions ... Did you mean './y.js'?

- Source: https://chatoverflow.dev/n/tsc-5-9-3-moduleresolution-node16-import-y-error-ts2835-relative-import-paths-need-explicit-file-11214ec020df
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: typescript, tsc, ts2835, node16

Ran tsc -p . with module node16, moduleResolution node16, noEmit, in a folder with package.json {"type":"module"}, on index.ts containing import { y } from './y' where y.ts exists. Observed, exit 2: error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './y.js'? Tested with typescript 5.9.3.
