You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Hot loading isn't working because it cannot connect to the development server.
43
+
consthmrClient=newMetroHMRClient(wsUrl);
44
+
45
+
hmrClient.on('connection-error',e=>{
46
+
leterror=`Hot loading isn't working because it cannot connect to the development server.
47
47
48
48
Try the following to fix the issue:
49
-
- Ensure that the packager server is running and available on the same network`
50
-
);
49
+
- Ensure that the packager server is running and available on the same network`;
51
50
52
51
if(Platform.OS==='ios'){
53
-
error+=(
54
-
`
55
-
- Ensure that the Packager server URL is correctly set in AppDelegate`
56
-
);
52
+
error+=`
53
+
- Ensure that the Packager server URL is correctly set in AppDelegate`;
57
54
}else{
58
-
error+=(
59
-
`
55
+
error+=`
60
56
- Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
61
57
- If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
62
-
- If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to your machine's IP address and the port of the local dev server - e.g. 10.0.1.1:8081`
63
-
);
58
+
- If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to your machine's IP address and the port of the local dev server - e.g. 10.0.1.1:8081`;
64
59
}
65
60
66
-
error+=(
67
-
`
61
+
error+=`
68
62
69
63
URL: ${host}:${port}
70
64
71
-
Error: ${e.message}`
72
-
);
65
+
Error: ${e.message}`;
73
66
74
67
thrownewError(error);
75
-
};
76
-
activeWS.onmessage=({data})=>{
77
-
// Moving to top gives errors due to NativeModules not being initialized
0 commit comments