Closed xec closed 10 months ago
After updating to latest (5.7.7) I get an error when attempting a type (the Select class):
Select
import type SelectClass from 'react-select/dist/declarations/src/Select'
Cannot find module 'react-select/dist/declarations/src/Select' or its corresponding type declarations.ts(2307)
The culprit seems to be the exports section in package.json which only allows very specific imports.
exports
package.json
This was introduced in https://github.com/JedWatson/react-select/pull/5559
I've suggested a fix in https://github.com/JedWatson/react-select/pull/5769 by adding an export rule for type definitions, but I'm open to other solutions/suggestions if any :)
Closing since I found a duplicate of this, sorry about the noise!
https://github.com/JedWatson/react-select/issues/5743
After updating to latest (5.7.7) I get an error when attempting a type (the
Select
class):The culprit seems to be the
exports
section inpackage.json
which only allows very specific imports.This was introduced in https://github.com/JedWatson/react-select/pull/5559
I've suggested a fix in https://github.com/JedWatson/react-select/pull/5769 by adding an export rule for type definitions, but I'm open to other solutions/suggestions if any :)