Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted import error: 'NativeModules' is not exported from './react-native'. #1423

Closed
hsavit1 opened this issue Mar 24, 2022 · 1 comment
Closed

Comments

@hsavit1
Copy link

hsavit1 commented Mar 24, 2022

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

@johnf
Copy link
Collaborator

johnf commented Dec 14, 2024

We’ve just released a major new version with significant changes and improvements. If you’re still experiencing this issue after upgrading, please open a new issue with updated details. We're closing all the very old issues to get on top of things. Thanks for your patience!

@johnf johnf closed this as completed Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants