Skip to content

Typescript error when importing "react-select/creatable" with moduleResolution "Node16" and "NodeNext" #5474

@mlandalv

Description

@mlandalv

Error occurs in 5.6.0. It works in 5.5.2.

// From package.json
"typescript": "^4.8.4",
"react-select": "^5.6.0",
// Example.tsx
import Select from 'react-select/creatable';

With moduleResolution "Node16" or "NodeNext".

Cannot find module 'react-select/creatable' or its corresponding type declarations.

Still works with moduleResolution "Node" though, which I guess is most common.

This seems to only affect creatable. import Select from 'react-select' works with Node16 and NodeNext.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/bug-unconfirmedIssues that describe a bug that hasn't been confirmed by a maintainer yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions