You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to resolve path to module 'react-native-screens'.
When I look at node_modules/react-native/index.js, I can see some pretty "non-standard" commonJS exports, which I suspect could contribute to the issue, but otherwise I don't see why it would fail on these modules in particular.
Indeed, using a getter on module.exports is both slow and causes all sorts of subtle issues - and also makes any linter plugin unable to statically resolve imports.
I'd suggest filing issues on react-native to stop using dynamically loaded exports. I'm not sure how else any linter could support it (and notably, native ESM in node absolutely doesn't).
Some modules do not resolve with eslint-plugin-import that DO resolve in react-native.
See facebook/react-native#28549
I noticed that this also happens with react-native-screens.
When I look at
node_modules/react-native/index.js
, I can see some pretty "non-standard" commonJS exports, which I suspect could contribute to the issue, but otherwise I don't see why it would fail on these modules in particular.For
react-native-screens
, it appears to use the (rarely used?) files directive inpackage.json
.Code that produces the false positive linter error:
The text was updated successfully, but these errors were encountered: