repack
repack copied to clipboard
Module Federation host app not working [ScriptManager] failed to load script : [NetworkFailure]
Environment
M1 Pro Xcode 15.4
"react-native": "0.74.1", "@callstack/repack": "4.0.0", "node: 20"
Issue
I am trying to run the module federation example from the Re.pack examples repository but encountering issues with the script manager failing to load. Despite creating new React Native apps and following all necessary configuration steps outlined on the Re.pack website, the module federation is not operational. Even after referring to the example apps, I am unable to get module federation up and running.
Reproducible Demo
https://github.com/anuragarwalkar/repack-module-federation
- clone repack-module-federation
- install all the dependencies
- now run the app
host app error
[ScriptManager] Failed to load script: [NetworkFailure] {"cache": false, "caller": undefined, "locator": {"absolute": false, "body": undefined, "fetch": true, "headers": undefined, "method": "GET", "query": "platform=android", "timeout": 30000, "url": "http://localhost:9000/app1.container.bundle", "verifyScriptSignature": "off"}, "scriptId": "app1"} {"originalError": [Error: Failed to connect to localhost/127.0.0.1:9000]}
App1 devServer error
Additional Information
Re.pack Version: 3.3.0 (tried with 4.0) React Native Version: 0.68.2 Platform: ios/Android Node Version: 18.2 Operating System: MacOs Sonoma 14.5