Bug: [import/no-unresolved] Error when importing typescript-eslint
in a pnpm setup
#10525
Closed
4 tasks done
Labels
bug
Something isn't working
external
This issue is with another package, not typescript-eslint itself
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://github.com/lnuvy/eslint9-eslint-typescript-8.18.1
Repro Code
ESLint Config
tsconfig
Expected Result
expected the import line to work without errors
Actual Result
Unable to resolve path to module 'typescript-eslint'.eslintimport/no-unresolved
Additional Info
Hello!
this is an issue I discovered while setting up ESLint 9 in a monorepo.
I found a potentially related issue (#10508), but there is a key difference: the error does not occur in the import statement for that case. I apologize if this turns out to be a duplicate that I overlooked.
I'm sharing a reproducible repository and images.
First image's project uses the Yarn package manager, while the images showing the error are from a project using the pnpm package manager.
Even after trying various versions of TypeScript, ESLint, and typescript-eslint, the error consistently occurs only in pnpm projects.
Functionally, everything works as expected, so using something like
// eslint-disable-next-line import/no-unresolved
is an option. but, I think this is not a fundamental solution, which is why I am reporting this issue.Thank you :)
The text was updated successfully, but these errors were encountered: