marklawlor / nativewind

React Native utility-first universal design system - powered by Tailwind CSS
https://nativewind.dev
MIT License
4.3k stars 233 forks source link

[V4] Unable to resolve "react-native-css-interop" #894

Open DaveVaval opened 3 weeks ago

DaveVaval commented 3 weeks ago

Describe the bug When updating to the latest version, or anything passed >4.0.13, I get this issue. After looking at passed issues it seemed like people were experiencing the same thing with pnpm, but in my case I am using NPM.

image

To Reproduce Steps to reproduce the behavior:

  1. Expo 49.0.93
  2. React Navigation 6
  3. Tailwindcss 3.3.2
  4. Using NPM

Additional context My bable config: image

and within my metro config I am requiring withNativeWind : const { withNativeWind } = require('nativewind/metro');

and returning my config like so: return withNativeWind(config, { input: './global.css' });

bradleybernard commented 3 weeks ago

Also getting the same with, with same looking babel config, but with Expo SDK 51 beta. Only seemed to hit me when I upgraded to SDK 51 beta... hm

iOS Bundling failed 3382ms node_modules/expo-router/entry.js (469 modules)
Unable to resolve "react-native-css-interop/jsx-runtime" from "node_modules/expo-router/build/qualified-entry.js"
DaveVaval commented 2 weeks ago

@bradleybernard in your case did it work using expo 50?

bradleybernard commented 2 weeks ago

Yep only with 51, I went back down to 50 and it works for some reason. No configs changed, just version changes in package file and lock file

alxlion commented 2 weeks ago

Forcing to 4.0.1 solved the issue

DaveVaval commented 2 weeks ago

Forcing to 4.0.1 solved the issue

Yeah the problem is I can't use the latest version, alot of classes don't work in 4.0.1. It's a bummer but I'll have to put nativewind in standby and stick with stylesheets until a stable release

GustavoBonfimS commented 1 week ago

I'm using Expo 51 and nativewind@canary (4.0.36) and it's working. The canary release fixed several issues since 4.0.1. See if it works for you.

younes200 commented 4 days ago

When using pnpm, try adding a .npmrc file to address this issue.

node-linker=hoisted
enable-pre-post-scripts=true