diff --git a/config/checkMetroBundlerPort.js b/config/checkMetroBundlerPort.js deleted file mode 100644 index a6474c891706..000000000000 --- a/config/checkMetroBundlerPort.js +++ /dev/null @@ -1,20 +0,0 @@ -const {isPackagerRunning} = require('@react-native-community/cli-tools'); - -/** - * Function isPackagerRunning indicates whether or not the packager is running. It returns a promise that - * returns one of these possible values: - * - `running`: the packager is running - * - `not_running`: the packager nor any process is running on the expected port. - * - `unrecognized`: one other process is running on the port we expect the packager to be running. - */ -isPackagerRunning().then((result) => { - if (result !== 'unrecognized') { - return; - } - - console.error( - 'The port 8081 is currently in use.', - 'You can run `lsof -i :8081` to see which program is using it.\n', - ); - process.exit(1); -}); diff --git a/package.json b/package.json index f803c74d578f..1a1807bbe6e9 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "scripts": { "postinstall": "cd desktop && npm install", "clean": "npx react-native clean-project-auto", - "android": "npm run check-metro-bundler-port && scripts/set-pusher-suffix.sh && npx react-native run-android", - "ios": "npm run check-metro-bundler-port && scripts/set-pusher-suffix.sh && npx react-native run-ios", - "ipad": "npm run check-metro-bundler-port && npx react-native run-ios --simulator=\"iPad Pro (12.9-inch) (4th generation)\"", - "ipad-sm": "npm run check-metro-bundler-port && npx react-native run-ios --simulator=\"iPad Pro (9.7-inch)\"", + "android": "scripts/set-pusher-suffix.sh && npx react-native run-android --port=8083", + "ios": "scripts/set-pusher-suffix.sh && npx react-native run-ios --port=8082", + "ipad": "npx react-native run-ios --port=8082 --simulator=\"iPad Pro (12.9-inch) (4th generation)\"", + "ipad-sm": "npx react-native run-ios --port=8082 --simulator=\"iPad Pro (9.7-inch)\"", "start": "npx react-native start", "web": "scripts/set-pusher-suffix.sh && concurrently npm:web-proxy npm:web-server", "web-proxy": "node web/proxy.js", @@ -32,7 +32,6 @@ "gh-actions-build": "./.github/scripts/buildActions.sh", "gh-actions-validate": "./.github/scripts/validateActionsAndWorkflows.sh", "analyze-packages": "ANALYZE_BUNDLE=true webpack --config config/webpack/webpack.common.js --env envFile=.env.production", - "check-metro-bundler-port": "node config/checkMetroBundlerPort.js", "symbolicate:android": "npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map", "symbolicate:ios": "npx metro-symbolicate main.jsbundle.map" },