nativewind: V4.0.16: verifyInstallation() displays error: jsxImportSource was not set to 'nativewind'

Describe the bug

verifyInstallation() displays an error:

ERROR  Error: jsxImportSource was not set to 'nativewind'. Please refer to http://nativewind.dev/troubleshooting#jsxImportSource

This error is located at:
    in RootLayout
    in Try
    in Unknown
    in Unknown (created by Route())
    in Route (created by Route())
    in Route() (created by ContextNavigator)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by wrapper)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by wrapper)
    in wrapper (created by ContextNavigator)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by ContextNavigator)
    in ContextNavigator (created by ExpoRoot)
    in ExpoRoot (created by App)
    in App (created by withDevTools(App))
    in withDevTools(App) (created by ErrorOverlay)
    in ErrorToastContainer (created by ErrorOverlay)
    in ErrorOverlay
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent), js engine: hermes

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/fendyk/expo-router-typescript-nativewind-example
  2. Use branch bug-verifyinstall
  3. Run with npm run start
  4. Wait for it to compile
  5. See error

Expected behavior It should run nativewind as intended

Additional context I think @marklawlor you’ve already described that this was an issue you already knew, but I thought it was nice to have a reminder here in case anyone has the same problem

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Reactions: 5
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Fixed in 4.0.35

I don’t crash without that function, but it also doesn’t work, none of the styles get applied anywhere

For those experiencing trouble with some styles not working (or styles not updating/hot reloading), check out #737 & #648. verifyInstallation() fails for me atm, but turns out --tunnel was the root cause of my style issues.

Basically, style bundle updates happen on a different port & don’t work with --tunnel.

Hope this helps, I spent all day trying to figure this out.

I’m having the same issue on Nativewind 4.0.23 with Expo 50 and Expo Router 3. Some styles aren’t working correctly.

To be fair, Nativewind 4 is still in beta so it’s not going to be perfect yet.

I had issues installing this with the Expo 50 SDK beta/Router 3 beta template, but it worked when I installed into a fresh Expo app and then updated the SDK and router myself. Wasn’t able to narrow specifically what was different and causing it to break.

We have the same issue. Note that the url is wrong, it should be https://www.nativewind.dev/v4/troubleshooting#jsxImportSource. Note the v4

We have done everything listed there, but we still have problems

I also followed these steps and still have the same issues as well.

We have the same issue. Note that the url is wrong, it should be https://www.nativewind.dev/v4/troubleshooting#jsxImportSource. Note the v4

We have done everything listed there, but we still have problems

I don’t crash without that function, but it also doesn’t work, none of the styles get applied anywhere

I am noticing that a lot of styles are not working as well. Is my setup just wrong?