onejs / one

❶ One is a new React framework - target web and native with a single Vite plugin and fully shared code, so you can ship cross-platform nearly as easy as single-platform.
https://onestack.dev
Other
3.28k stars 66 forks source link

Example fails on Expo with Unable to resolve "../../App" from "node_modules/expo/AppEntry.js #124

Open Arsenalist opened 1 month ago

Arsenalist commented 1 month ago

Saw on Hacker News and gave it a shot. Tried to publish on EAS and create a development build, got it done successfully but when I run npm run ios I get this error in the simulator:

../../App" from "node_modules/expo/AppEntry.js None of these fiels exist: App(.ios,ts|.native.ts etc...

image

I'm on Node 18.19.0, here's the package.json:

{
  "name": "jump-akh",
  "version": "1.1.295",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "one dev",
    "dev:clean": "one dev --clean",
    "clean": "one clean",
    "prebuild:native": "one prebuild",
    "build:web": "one build",
    "serve": "one serve",
    "ios": "EXPO_NO_TELEMETRY=true expo run:ios",
    "android": "EXPO_NO_TELEMETRY=true expo run:android",
    "upgrade:tamagui": "yarn up '*tamagui*' '@tamagui/*'"
  },
  "installConfig": {
    "hoistingLimits": "workspaces"
  },
  "dependencies": {
    "@tamagui/animations-moti": "^1.112.21",
    "@tamagui/colors": "^1.112.21",
    "@tamagui/image-next": "^1.112.21",
    "@tamagui/lucide-icons": "^1.112.21",
    "@tamagui/react-native-media-driver": "^1.112.21",
    "@types/react": "~18.2.79",
    "@vxrn/color-scheme": "1.1.295",
    "babel-plugin-module-resolver": "^5.0.2",
    "expo": "~51.0.34",
    "expo-dev-client": "~4.0.27",
    "expo-modules-core": "^1.12.24",
    "one": "1.1.295",
    "react": "^18.3.1",
    "react-native": "0.75",
    "react-native-reanimated": "~3.10.1",
    "react-native-screens": "3.31.1",
    "react-native-svg": "15.2.0",
    "react-native-web": "^0.19.12",
    "tamagui": "^1.112.21"
  },
  "devDependencies": {
    "@biomejs/biome": "^1.8.3",
    "@tamagui/vite-plugin": "^1.112.21",
    "vite": "6.0.0-beta.1"
  }
}
natew commented 1 month ago

Sorry to hear - I saw your messages in Discord, will follow up with you there until we have a great solution.

For now, using Expo Go and simulators I think is the safest bet. We are definitely early, and while production builds do work ("on my machine"), we're going to be investing a lot into improving them over the next weeks.

Arsenalist commented 1 month ago

Sorry to hear - I saw your messages in Discord, will follow up with you there until we have a great solution.

For now, using Expo Go and simulators I think is the safest bet. We are definitely early, and while production builds do work ("on my machine"), we're going to be investing a lot into improving them over the next weeks.

Hi, I did not post on Discord. I was looking for a Discord link but didn't find it. I only see a Twitter and. Github link on https://onestack.dev/

wynnej1983 commented 1 month ago

@natew maybe we need to add a main entry to the package.json to tell it where to locate the one router?

zetavg commented 1 month ago

I think the cause is currently npm run ios not only runs the iOS app in Simulator but also starts a Metro dev server - which will not work.

If you see a message saying Metro waiting on ..., please stop that server and run npm run dev instead, to start the correct dev server.

DaveVaval commented 1 month ago

Hey guys! I wanted to chime in on this issue since I'm pretty much on the same boat.

I am playing around with One because the project looks pretty cool, but I'm having a really hard time trying to run a test app on my S22 Ultra.

Issues

  1. Using Expo Go and bun dev qr throws expo go in an infinite loading screen
  2. I then tried to use a specific command: expo start --tunnel, only to be met with the exact bug stated here. Unable to resolve "../../App" from "node_modules/expo/AppEntry.js

Progress

I started playing around with different configs and finally got the app to build at one point. What worked for me was:

  1. Create an App.tsx file at the root.
  2. Manually register the Layout component: import Layout from "./app/_layout"; import { AppRegistry } from "react-native"; AppRegistry.registerComponent('one-example', () => Layout);
  3. Then launch expo start --tunnel

Results

The result I got was expo go finally building the app, but ran into other issues. Here are the logs:

$ expo start --tunnel Starting project at /home/grimm/Dev/one/test-app env: load .env env: export DATABASE_URL (node:588097) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) Starting Metro Bundler Tunnel connected. Tunnel ready. The following packages should be updated for best compatibility with the installed expo version: react@18.3.1 - expected version: 18.2.0 Your project may not work correctly until you install the expected versions of the packages. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █ ▄▄▄▄▄ █ █▄▄▀▄ ▄▀▀██ ▄▄▄▄▄ █ █ █ █ █ ▀▄ █▀▀▄ ▄█▄ █ █ █ █ █ █▄▄▄█ █▀██▀▀ ▄▄▄▄▀▀██ █▄▄▄█ █ █▄▄▄▄▄▄▄█▄▀▄█ █ ▀▄▀ ▀ █▄▄▄▄▄▄▄█ █▄▄██▄ ▄██▀▀▄▀▀▀▀▀ █▄▀▀ ▀ ▄ █ ██ ▄█▄▀▄█▀ ▄▄▀▄▄ ▀██▄▄▄█▄ █ █▀▄ ▄▄▀▄███▄█▄▀█ █ ▄█▄█▀ ▀▄█▀▀█ ██ █ ▄ ▄ █ ▄█▀█▄ ██ █▀▀▀▄▄▀ █ █ █▀▄▀▄ █▀▀▄▀▄ ▀ ▄▄█▄▄▀▄▀▄█▀ █ ████▀██▄ ▀▄▀ ▄ ▄ ██ █▄▄▀ ▄█ █ █▄▄▄███▄▄▀█▀█▄ ▀ ▄▀ ▄▄▄ ▄▀▄▀█ █ ▄▄▄▄▄ █▀ █▀█▀ █ █ █▄█ █▀ █ █ █ █ █▄▄ ▄▀▄▄▀▀▄▄▄ ▄▄▄▀██ █ █ █▄▄▄█ █▀ ▄ ▄ ▄▄▄ ▀█ ▀▀██ █ █ █▄▄▄▄▄▄▄█▄▄▄█▄▄█▄█▄▄█▄█▄█▄██▄██

› Metro waiting on › Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Using Expo Go › Press s │ switch to development build

› Press a │ open Android › Press w │ open web

› Press j │ open debugger › Press r │ reload app › Press m │ toggle menu › Press o │ open project code in your editor

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit. Android Bundled 5958ms node_modules/expo/AppEntry.js (1670 modules) WARN The ONE_SERVER_URL environment variable is not set. While things will work in development mode as we'll be using your development server, you should still set ONE_SERVER_URL in your .env file for your production builds to work. ERROR Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at withDevTools.js:18. in withDevTools(Anonymous) 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) ERROR Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at withDevTools.js:18. in withDevTools(Anonymous) 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) ERROR Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of withDevTools(Anonymous).

This error is located at: in withDevTools(Anonymous) 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 ERROR Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of withDevTools(Anonymous).

This error is located at: in withDevTools(Anonymous) 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 › Stopped server

Context

For context, I use Expo on a daily basis, but I use a development build since a lot of the native modules I use require so. I think even Expo doesn't recommend using Expo Go anymore and tell developers to just use a development build. I'm also developing on WSL2 if that affects anything.

prabirshrestha commented 1 month ago

Was excited to give one a try but hitting the same issue when running npm run dev and npm run ios.

zetavg commented 1 month ago

Hi @prabirshrestha, what did you see in your dev server terminal output? Especially the part when you see Unable to resolve "../../App" in the app. That would help us a lot in identifying the issue 🙏

prabirshrestha commented 1 month ago

If I run bunx one@latest and select minimal tamagui and run bun dev and bun ios. I get the error mentioned at the top. As soon as I run bun prebuild:native and then bun ios I was able to run the app.

Now if I try to bring it to an existing mono repo it has a very different error.

`bun ios` ``` › Build Succeeded › 0 error(s), and 4 warning(s) Waiting on http://localhost:8081 › Installing on iPhone 15 Pro Max › Opening on iPhone 15 Pro Max (dev.onestack.example-tamagui) › Opening dev.onestack.example-tamagui://expo-development-client/?url=http%3A%2F%2F10.10.3.200%3A8081 on iPhone 15 Pro Max ``` ![image](https://github.com/user-attachments/assets/2d51b015-24cf-4476-a3b7-0f7e430e76be) ``` ➡ [tamagui] built config and components (91ms) [vite] connected. Server running on http://0.0.0.0:8081 › Press ow │ open web › Press oe │ open editor › Press qr │ show Expo Go QR code › Press ? │ show this menu ❶ Pre-building react-native (one time cost)... ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��BIDATx�c`�dx � �P�?�ǣ���%���* ��1A� �ȑ!��h ${�2���钓4E��IEND�B`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2591: 1 │ ...abled:props.total<=1,level:props.level,image:require('./LogBoxImages/chevron-right.png'),onPress:function(){return props.onSelectIndex(next... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699⏎:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��EIDATx�c� �'.�p�? ���1i���@:�t�@���ѥ + l�#G�L��=��C0������+IEND�B`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2264: 1 │ ...abled:props.total<=1,level:props.level,image:require('./LogBoxImages/chevron-left.png'),onPress:function(){return props.onSelectIndex(prevI... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD��IDATxڝՅ [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxNotification.js:1:3176: 1 │ ...ress},React.createElement(_Image.default,{source:require('./LogBoxImages/close.png'),style:dismissStyles.image})));}var countStyles=_StyleS... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR0_F�(IDATx�͖%�QEϠ^f� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2289: 1 │ ...lor;switch(props.status){case'FAILED':image=require('./LogBoxImages/alert-triangle.png');color=LogBoxStyle.getErrorColor(1);break;case'PEND... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR,�����IDATx�헵aD1'Tz��zP~T��kU(�����Gه�.{�d"��1����}�;��(q`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2395: 1 │ ...tyle.getErrorColor(1);break;case'PENDING':image=require('./LogBoxImages/loader.png');color=LogBoxStyle.getWarningColor(1);break;}if(props.s... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) Error pre-building react-native Error building React Native bundle: Error: Build failed with 5 errors: node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2264: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | prabirshrestha@Prabirs-MacBook-Pro ~/c/o/a/objstor (main)> cat package.json { "name": "objstor", "version": "1.1.317", "private": true, "type": "module", "scripts": { "dev": "one dev", "dev:clean": "one dev --clean", "clean": "one clean", prabirshrestha@Prabirs-MacBook-Pro ~/c/o/a/objstor (main)> bun dev $ one dev ➡ [tamagui] built config and components (94ms) [vite] connected. Cannot optimize dependency: moti/author, present in ssr 'optimizeDeps.include' Server running on http://0.0.0.0:8081 › Press ow │ open web › Press oe │ open editor › Press qr │ show Expo Go QR code › Press ? │ show this menu ❶ Pre-building react-native (one time cost)... ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��BIDATx�c`�dx � �P�?�ǣ���%���* ��1A� �ȑ!��h ${�2���钓4E��IEND�B`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2591: 1 │ ...abled:props.total<=1,level:props.level,image:require('./LogBoxImages/chevron-right.png'),onPress:function(){return props.onSelectIndex(next... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��EIDATx�c� �'.�p�? ���1i���@:�t�@���ѥ + l�#G�L��=��C0������+IEND�B`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2264: 1 │ ...abled:props.total<=1,level:props.level,image:require('./LogBoxImages/chevron-left.png'),onPress:function(){return props.onSelectIndex(prevI... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR,�����IDATx�헵aD1'Tz��zP~T��kU(�����Gه�.{�d"��1����}�;��(q`� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2395: 1 │ ...tyle.getErrorColor(1);break;case'PENDING':image=require('./LogBoxImages/loader.png');color=LogBoxStyle.getWarningColor(1);break;}if(props.s... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR0_F�(IDATx�͖%�QEϠ^f� [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2289: 1 │ ...lor;switch(props.status){case'FAILED':image=require('./LogBoxImages/alert-triangle.png');color=LogBoxStyle.getErrorColor(1);break;case'PEND... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) ✘ [ERROR] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD��IDATxڝՅ [plugin remove-flow] node_modules/react-native/Libraries/LogBox/UI/LogBoxNotification.js:1:3176: 1 │ ...ress},React.createElement(_Image.default,{source:require('./LogBoxImages/close.png'),style:dismissStyles.image})));}var countStyles=_StyleS... ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onLoad" callback registered here: node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:20: 1150 │ let promise = setup({ ╵ ^ at setup (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:104:21) at handlePlugins (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1150:21) at buildOrContextImpl (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:873:5) at Object.buildOrContext (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:699:5) at /Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2028:15 at new Promise () at Object.build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:2027:25) at build (/Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/node_modules/esbuild/lib/main.js:1878:51) at buildReactNative (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/@vxrn/react-native-prebuilt/dist/esm/index.mjs:73:10) at prebuildReactNativeModules (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/swapPrebuiltReactModules.mjs:30:22) at async getReactNativeBundle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/utils/getReactNativeBundle.mjs:23:7) at async file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:79:31 at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/vxrn/dist/exports/dev.mjs:77:24) at async Object.handler (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:1970:19) at async Server.toNodeHandle (file:///Users/prabirshrestha/code/objstor/apps/objstor/node_modules/h3/dist/index.mjs:2257:7) Error pre-building react-native Error building React Native bundle: Error: Build failed with 5 errors: node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2264: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��EIDATx�c� �'.�p�? ���1i���@:�t�@���ѥ + l�#G�L��=��C0������+IEND�B`� node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js:1:2591: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD�8��BIDATx�c`�dx � �P�?�ǣ���%���* ��1A� �ȑ!��h ${�2���钓4E��IEND�B`� node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2289: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR0_F�(IDATx�͖%�QEϠ^f� node_modules/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js:1:2395: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHDR,�����IDATx�헵aD1'Tz��zP~T��kU(�����Gه�.{�d"��1����}�;��(q`� node_modules/react-native/Libraries/LogBox/UI/LogBoxNotification.js:1:3176: ERROR: [plugin: remove-flow] unknown: Unexpected character '�'. (1:0) > 1 | �PNG | ^ 2 | 3 | 4 | IHD��IDATxڝՅ Note, some errors may happen due to a stale Vite cache, you may want to try re-running with the "--clean" flag ⓵ [spa] http://0.0.0.0:5173/.expo/.virtual-metro-entry.bundle?platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=dev.onestack.example-tamagui resolved to ```
zetavg commented 1 month ago

Thanks for providing more context. I saw that our "ios" script in package.json the template project is wrong, which will cause the error mentioned at the top. After running bun prebuild:native, it will be updated to the correct one, so then that's resolved.

The mono repo issue is interesting. Would you mind opening a new issue and, if possible, provide a reproduction?