Open Arsenalist opened 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.
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/
@natew maybe we need to add a main
entry to the package.json to tell it where to locate the one router?
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.
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.
bun dev qr
throws expo go in an infinite loading screenexpo start --tunnel
, only to be met with the exact bug stated here. Unable to resolve "../../App" from "node_modules/expo/AppEntry.js
I started playing around with different configs and finally got the app to build at one point. What worked for me was:
App.tsx
file at the root.Layout
component:
import Layout from "./app/_layout";
import { AppRegistry } from "react-native";
AppRegistry.registerComponent('one-example', () => Layout);
expo start --tunnel
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
› 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
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.
Was excited to give one a try but hitting the same issue when running npm run dev
and npm run ios
.
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 🙏
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.
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?
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...
I'm on Node 18.19.0, here's the package.json: