react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.41k stars 905 forks source link

fix(cli-tools): declare dependency on `prompts` #2518

Closed tido64 closed 1 month ago

tido64 commented 1 month ago

Summary:

prompts is used in cli-tools, but never declared as a dependency, causing commands to fail in pnpm setups:

Error: Cannot find module 'prompts'
Require stack:
- /~/node_modules/.store/@react-native-community-cli-tools-npm-14.0.1-fb5b1d1033/package/build/prompt.js
- /~/node_modules/.store/@react-native-community-cli-tools-npm-14.0.1-fb5b1d1033/package/build/index.js
- /~/node_modules/.store/@react-native-community-cli-npm-14.0.1-d30aee3125/package/build/commands/init/errors/InvalidNameError.js
- /~/node_modules/.store/@react-native-community-cli-npm-14.0.1-d30aee3125/package/build/commands/init/validate.js
- /~/node_modules/.store/@react-native-community-cli-npm-14.0.1-d30aee3125/package/build/commands/init/init.js

Test Plan:

n/a

tido64 commented 1 month ago

This needs to be cherry-picked to 14.x.