-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
Description
The React Native development server fails to start on Node.js v21+ with the following error:
`
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'format' must be one of: 'reset', 'bold', 'dim', 'italic', 'underline', 'blink', 'inverse', 'hidden', 'strikethrough', 'doubleunderline', 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'bgBlack', 'bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', 'bgWhite', 'framed', 'overlined', 'gray', 'redBright', 'greenBright', 'yellowBright', 'blueBright', 'magentaBright', 'cyanBright', 'whiteBright', 'bgGray', 'bgRedBright', 'bgGreenBright', 'bgYellowBright', 'bgBlueBright', 'bgMagentaBright', 'bgCyanBright', 'bgWhiteBright'. Received [ 'bold', 'inverse' ]
at styleText (node:util:210:5)
at attachKeyHandlers (/path/to/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js:91:25)
`
Steps to reproduce
- Steps to Reproduce
- Install Node.js v21.0.0 or higher
- Create a new React Native project or use existing one
- Run npx react-native start
- Observe the error
React Native Version
0.82.1
Affected Platforms
Other (please specify)
Output of npx @react-native-community/cli info
React Native version: 0.82.1
@react-native/community-cli-plugin version: 0.82.1
Node.js version: 21.7.3
Operating System: macOS 23.3.0
Stacktrace or Logs
`
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'format' must be one of: 'reset', 'bold', 'dim', 'italic', 'underline', 'blink', 'inverse', 'hidden', 'strikethrough', 'doubleunderline', 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'bgBlack', 'bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', 'bgWhite', 'framed', 'overlined', 'gray', 'redBright', 'greenBright', 'yellowBright', 'blueBright', 'magentaBright', 'cyanBright', 'whiteBright', 'bgGray', 'bgRedBright', 'bgGreenBright', 'bgYellowBright', 'bgBlueBright', 'bgMagentaBright', 'bgCyanBright', 'bgWhiteBright'. Received [ 'bold', 'inverse' ]
at styleText (node:util:210:5)
at attachKeyHandlers (/path/to/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js:91:25)
MANDATORY Reproducer
https://github.com/jiangtao/react-native-in-node21
Screenshots and Videos
No response
