Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: No bundle URL present. #2108

Open
neko3cs opened this issue Apr 7, 2024 · 10 comments
Open

ERROR: No bundle URL present. #2108

neko3cs opened this issue Apr 7, 2024 · 10 comments
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@neko3cs
Copy link

neko3cs commented Apr 7, 2024

Environment

react-native -v:12.3.6(npx)
npm ls react-native-macos:react-native-macos@0.73.24
node -v:v21.7.2
npm -v:10.5.0
yarn --version:1.22.22
xcodebuild -version:Xcode 15.3 Build version 15E204a

Steps to reproduce the bug

Do this getting started.
https://microsoft.github.io/react-native-windows/docs/rnm-getting-started

Before npx react-native run-macos, you should run cd macos && pod install.
I cannot run app without this step.

Expected Behavior

Launch application and show ui same as iOS.

Actual Behavior

image

Reproducible Demo

src.zip

Full size is over 25MB.
So this is a sample deleted this:

  • macos/Pod
    • you can get with: cd macos && pod install
  • node_module
    • you can get with: yarn install

Additional context

I tryed what this comment telling, but I cannot launch app.
#400 (comment)

First, --use-react-native-macos has occured not found error.
error messeage: error: unknown option '--use-react-native-macos'

So I removed 👆 option and run this: node node_modules/react-native-macos/local-cli/cli.js bundle --entry-file index.js --platform macos --bundle-output MyApp.jsbundle
But same error has occured.

@neko3cs neko3cs added the bug Something isn't working label Apr 7, 2024
@Saadnajmi
Copy link
Collaborator

Yeah that option is deprecated / removed so we should update the docs.
Does your app work if you run a metro server locally (I.e run 'npx react-native start' from a terminal while the app is running)?

@neko3cs
Copy link
Author

neko3cs commented Apr 10, 2024

@Saadnajmi
I'm sorry for late message.
iOS App is work. but macOS App is not work.
To begin with, when I run npx react-native start, I don't see the macOS startup options.
Only "reload the app", "open developer menu", "run on iOS", "run on Android".

@Saadnajmi
Copy link
Collaborator

@neko3cs The macOS startup options won't show, but if you click "Reload" in the Redbox, it should still properly reload the bundle

@neko3cs
Copy link
Author

neko3cs commented Apr 12, 2024

@Saadnajmi
I think We have difference in perception. The image of section "Actual Behavior" is what running "npx react-native run-macos", not "npx react-native start". Both of that commands behave differently.

react-native-macos-error

@bear-ei
Copy link

bear-ei commented Apr 16, 2024

@Saadnajmi I think We have difference in perception. The image of section "Actual Behavior" is what running "npx react-native run-macos", not "npx react-native start". Both of that commands behave differently.

Currently, executing npx react-native run-macos in version 0.73.0 does indeed result in the issue of "No bundle URL present." However, you can first run npx react-native start in one terminal to manually start the local Metro server, and then execute npx react-native run-macos to start the macOS application.

@Saadnajmi
Copy link
Collaborator

@Bear-AI Thanks, yes I think run-macos is broken atm, I want to replace it with https://github.com/react-native-community/cli/tree/main/packages/cli-platform-apple , perhaps with the 0.74 release. I'm glad we found a workaround!

@neko3cs
Copy link
Author

neko3cs commented Apr 18, 2024

Yeeeeeaaaaaah!!! I'm happy to lauch my app!
@Saadnajmi @bear-ei Thank you so much for your helping!
I ran metro server on background(npx react-native start on other terminal), and I ran npx react-native run-macos.
So app is launched.

I hope to fix this problem. Is this a Metro server issue?
Should I open an Issue in the Repository?

@Saadnajmi
Copy link
Collaborator

No, I think it's still an issue with our repo

@neko3cs
Copy link
Author

neko3cs commented Apr 18, 2024

Oh, I understand. So "perhaps with the 0.74 release." you say.
I looking forward to release it.

@michelcrypt4d4mus
Copy link

also having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

4 participants