react-native-vector-icons
react-native-vector-icons copied to clipboard
Attempted import error: 'NativeModules' is not exported from './react-native'.
Environment
Happened when trying to upgrade to react 18 and react-native-web 0.18
in my package.json
"react": "^0.0.0-experimental-3f8990898-20220323",
"react-dom": "^0.0.0-experimental-3f8990898-20220323",
"react-native-web": "^0.0.0-b2a3e86d",
Description
Describe your issue in detail. Include screenshots if needed.
This was working with react 17.0.2 and react-native-web 0.17.7 . I tried upgrading to 18 and saw this compilation failure.
./node_modules/react-native-vector-icons/lib/create-icon-set.js
Attempted import error: 'NativeModules' is not exported from './react-native'.
My setup is with CRA, and I have this step in the config-overrides.js
...
module.exports = override(
...
babelInclude([
path.resolve(__dirname, "node_modules/react-native-vector-icons"),
])
...
)
Reproducible Demo
coming soon