When running react-native rnx-start --port 62536 I receive the following error:
error options.port should be >= 0 and < 65536. Received type number (NaN).
RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received type number (NaN).
at new NodeError (node:internal/errors:399:5)
at validatePort (node:internal/validators:390:11)
at Server.listen (node:net:1868:5)
at /Users/cvonlehe/Projects/react-native/scheduling-admin-app/node_modules/@react-native/community-cli-plugin/node_modules/metro/src/index.flow.js:321:14
at new Promise (<anonymous>)
at earlyPortCheck (/Users/cvonlehe/Projects/react-native/scheduling-admin-app/node_modules/@react-native/community-cli-plugin/node_modules/metro/src/index.flow.js:317:11)
at exports.runServer (/Users/cvonlehe/Projects/react-native/scheduling-admin-app/node_modules/@react-native/community-cli-plugin/node_modules/metro/src/index.flow.js:124:9)
at startServer (/Users/cvonlehe/Projects/react-native/scheduling-admin-app/node_modules/@rnx-kit/metro-service/lib/server.js:64:12)
at Object.rnxStart [as func] (/Users/cvonlehe/Projects/react-native/scheduling-admin-app/node_modules/@rnx-kit/cli/lib/start.js:140:66)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
What happened?
When running
react-native rnx-start --port 62536
I receive the following error:This seems to be cause by
parseInt
located here: https://github.com/microsoft/rnx-kit/blob/main/packages/cli/src/start.ts#L237Affected Package
@rnx-kit/cli
Version
0.16.22
Which platforms are you seeing this issue on?
System Information
Steps to Reproduce
Run
react-native rnx-start --port [port]
specifying any port that is >= 0 and < 65536.Code of Conduct