Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v6: Cannot find module '@typescript-eslint/*' or its corresponding type declarations #7284

Closed
Labels
fix: user errorissue was fixed by correcting the configuration / correcting the codeworking as intendedIssues that are closed as they are working as intended
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Overview

A handful of folks have mentioned that after upgrading to v6, trying toimport from@typescript-eslint/* packages such as@typescript-eslint/utils causes a new TypeScript type error:

import{ESLintUtils}from'@typescript-eslint/utils';
Cannot find module '@typescript-eslint/utils' or its corresponding type declarations.

This is not a bug. We intentionally dropped support in v6 for Node <16 asthose versions of node are EOL.v6 uses package.json exports - which requires Node 16+ and isn't supported by that older module resolution strategy.

To fix the issue, switch your TSConfig's module resolution to a newer version, most likely"bundler","node16", or"nodenext". See theaka.ms/tsconfig"moduleResolution" docs for more information.

{"compilerOptions": {"moduleResolution":"bundler"    }}

SeeTypeScript's new modules reference docs for more information.

Issues that are duplicates of this one:

https://arethetypeswrong.github.io/?p=%40typescript-eslint%2Futils%406.0.0 also shows a nice table of whichmoduleResolution values we support. It's all of them exceptnode10.

Keeping this issue open so it shows up more in searches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix: user errorissue was fixed by correcting the configuration / correcting the codeworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp