roninoss / rn-primitives

Style-agnostic, accessible React Native components for iOS, Android, and Web
https://rnprimitives.com
MIT License
424 stars 12 forks source link

Broken with expo 52 #46

Open davecarlson opened 21 hours ago

davecarlson commented 21 hours ago
Server Error
Cannot find module '@radix-ui/react-select'
Require stack:
- /Users/user/Code/proj/node_modules/expo-router/node/render.js.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node&unstable_tran... See More
Call Stack
factory
node:@radix-ui/react-select:1:16
Call Stack
  Function._resolveFilename (node:internal/modules/cjs/loader)
  Function._load (node:internal/modules/cjs/loader)
  TracingChannel.traceSync (node:diagnostics_channel)
  wrapModuleLoad (node:internal/modules/cjs/loader)
  Module.require (node:internal/modules/cjs/loader)
  $$require_external (node:internal/modules/helpers)
  factory (node:@radix-ui/react-select:1:16)
Web ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ 98.8% (2563/2578)TypeError: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '/Users/user/Code/\x00node:@radix-ui/react-select'
    at Object.readFileSync (node:fs:439:14)
    at getCodeFrame (/Users/user/Code/proj/node_modules/metro/src/Server.js:949:18)
    at Server._symbolicate (/Users/user/Code/proj/node_modules/metro/src/Server.js:1026:22)
    at Server._processRequest (/Users/user/Code/proj/node_modules/metro/src/Server.js:419:7) {
  code: 'ERR_INVALID_ARG_VALUE'
}
migueldv90 commented 1 hour ago

I just encountered this problem when trying to upgrade to Expo 52 and react native .76

migueldv90 commented 6 minutes ago

This is not a problem with this library. I was able to solve this by updating my libs in the package.json. To tell you the truth, I don't know which package upgrade fixed this issue.

Also, I'd like to point out that if you are using "Theme" make sure you fix the breaking change.

import { Theme, ThemeProvider, DefaultTheme, DarkTheme } from '@react-navigation/native'; const LIGHT_THEME: Theme = { ...DefaultTheme, colors: NavTheme.light, }; const DARK_THEME: Theme = { ...DarkTheme, colors: NavTheme.dark, };

By any chance are you using react-native-reusables? That's how I was able to solve this issue, by going through their recent change history.