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

npm run web errors with expo-modal #5

Closed
jmatsushita opened this issue Jan 8, 2020 · 2 comments
Closed

npm run web errors with expo-modal #5

jmatsushita opened this issue Jan 8, 2020 · 2 comments

Comments

@jmatsushita
Copy link

I get errors when running npm run web the console shows:

.../App.js
Attempted import error: 'Modal' is not exported from 'expo-modal'.

.../App.js
Attempted import error: 'dismissModal' is not exported from 'expo-modal'.

.../App.js
Attempted import error: 'showModal' is not exported from 'expo-modal'.

And the browser page shows further errors:

TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Module.<anonymous>
node_modules/expo-modal/index.js:19
  16 |     }
  17 | }
  18 | 
> 19 | module.exports = {
  20 |     Modal,
  21 |     showModal: Util.showModal,
  22 |     dismissModal: Util.dismissModal,
@jmatsushita
Copy link
Author

Removing the expo-modal related imports in App.js fixes the issue. It would be great if you aimed to maintain react-native-web compatibility, so maybe having an App.web.js without expo-modal would be one way to address this? Another, since it seems you're maintaining the expo-modal package, would be to offer react-native-web compatibility for it, so I created an issue there codersera-repo/expo-modal#1

Thanks for the very cool project!

@codersera-repo
Copy link
Owner

thanks @jmatsushita

the above issue suggested by you is fixed now.

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