#ESLint: Import Path Not Resolved in TypeScript

8 messages · Page 1 of 1 (latest)

zenith field
#

I'm having trouble with ESLint in my TypeScript project. For some reason, ESLint is flagging my imports as "unable to resolve". I've already set up the tsconfig.json correctly (as far as I know) and ESLint is configured using .eslintrc.json.

Does anyone have suggestions on what might be causing this issue or how to fix it?

Unable to resolve path to module './myModule' import/no-unresolved

frozen jackal
#

are you using typescript-eslint, and are you setting up custom paths?

#

are you using esm or cjs?

zenith field
#

Thanks @frozen jackal for the reply.
I am using "eslint": "9.10.0", and all of the config are in eslint.config.js

frozen jackal
#

v9 requires a different format of config afaik yeah

#

you didn't answer any of my questions though

zenith field
#

No i am not using typescript-eslint; I am using the following

"eslint": "9.10.0",
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-spellcheck": "0.0.20",

And I am not sure what you mean by "custom paths", but i am using the usual structure nothing custom

frozen jackal
#

you'll need typescript-eslint for eslint to understand typescript correctly.