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

Unable to resolve module '@unimodules/core` from '...expo-screen...' #42

Closed
jo-san opened this issue Mar 15, 2022 · 5 comments
Closed

Comments

@jo-san
Copy link

jo-san commented Mar 15, 2022

Thanks for an awesome project - really loved it!

We are building our UI library in react-native which will get used in our web projects as well, we are trying to move our setup to tamagui and facing the below issue in our react-native project setup.

Attaching screenshot for reference:
image

Package details
"@tamagui/babel-plugin": "1.0.0-alpha.68"
"react-native": "0.63.4"
"react-native-web": "0.17.7"

babel.config.js

      '@tamagui/babel-plugin',
      {
        components: ['tamagui'],
        config: './theme.js',
        importsWhitelist: ['constants.js', 'colors.js'],
        logTimings: true,
        disableExtraction: process.env.NODE_ENV === 'development',
      },
    ]```
@karlsander
Copy link

karlsander commented Mar 17, 2022

IIRC tamagui relies on @expo/match-media for media queries on the native site. That requires your project to be set up for expo modules, formerly (?) known as unimodules. It should be a straightforward setup, as long as you aren't using react-native-navigation or a native-RN "brownfield" hybrid, then it's 😓 because it wants to "own" your app entry point.

@natew
Copy link
Member

natew commented Mar 24, 2022

@karlsander thanks for the heads up, I definitely should document that better or find a way to avoid the hard dep there.

@jothi-pyt
Copy link

Thanks @karlsander
As we are using native-cli I have installed react-native-unimodules package which introduces the below errors, Please check and let me know how to make this work

We are using @react-navigation/native

image

@natew
Copy link
Member

natew commented Mar 26, 2022

Please set up a reproduction repo and I'll check it out.

@natew
Copy link
Member

natew commented May 18, 2022

I restructured things and removed the need for most unimodules stuff, just expo. Check the starter repo if you need and guidance.

@natew natew closed this as completed May 18, 2022
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

4 participants