Closed as not planned
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
utils
Playground Link
No response
Repro Code
import { ESLintUtils, TSESTree } from '@typescript-eslint/utils';
ESLint Config
No response
tsconfig
Expected Result
I can use the module of @typescript-eslint/utils
.
Actual Result
The following error occurs.
Cannot find module @typescript-eslint/utils or its corresponding type declarations
Additional Info
When I use @typescript-eslint/utils, the error
Cannot find module @typescript-eslint/utils or its corresponding type declarations
occurred.
The project structure is
.
├── packages/
│ └── eslint-plugin-foo/
│ ├── node_modules/
│ │ └── @typescript-eslint/
│ │ └── utils
│ ├── src/
│ │ └── rules/
│ │ └── some-rule.ts
│ └── tsconfig.json
└── tsconfig.json
When I use the package like,
import { ESLintUtils, TSESTree } from '@typescript-eslint/utils/dist';
...
the error disappear. But when I run a test for it, the following error shown
Package subpath './dist' is not defined by "exports" in somepath/packages/eslint-plugin-foo/node_modules/@typescript-eslint/utils/package.json
Versions
package | version |
---|---|
@typescript-eslint/utils |
6.8.0 |