Skip to content

No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle. unsanitizedScriptURLString = (null) #167

@Mynini

Description

@Mynini

Environment

macOS: 15.6.1
Xcode: 26.2
Node.js: v23.8.0
pnpm: 9.15.3
Ruby: 3.2.2
React Native: 0.78.2
React: 19.0.0
@rspack/core: ^1.3.9

Description

I tried running the example on a physical device using pnpm run:host:ios, and I encountered the following error.

Image

iI managed to fix this issue using the solution below, but I’m not sure if it’s the right approach. It does allow the app to build and run on a physical device, though.

Image

After fixing the build issue with the solution above, I ran into another problem.
The app can now be built successfully on my iPhone, but it crashes (or throws an error) right after launching. The error is shown below.

I’ve confirmed that:
pnpm start is running
My iPhone and Mac are connected to the same Wi-Fi network

Image

I temporarily solved this problem using the following approach. It allows a real iPhone to successfully connect to the server, but there is an issue: when I modify the local code and save it, the real iPhone does not fast refresh the page. I have to kill the process and restart the app to see the updated page. So I think this approach has a problem. How can I fix this issue No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle. unsanitizedScriptURLString = (null)? Or how can I solve the “no fast refresh” problem?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions