I understand there's a bug with NPM5 and CRNA, so I installed it with Yarn. I installed my new app, went into it's folder and entered 'yarn start' just as the command prompted me to do. I got an error.
I don't know if it matters, but npm start does work for other react apps, it's only react-native that's giving me this problem.
Start the development build for a react app.
Jonathans-MBP:my-native-app jonathankuhl$ yarn start
yarn run v1.5.1
$ react-native-scripts start
16:43:13: Unable to start server
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c react-native-scripts start
Directory: /Users/jonathankuhl/Documents/Programming/react/my-native-app
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jonathankuhl/Documents/Programming/react/my-native-app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:npm ls react-native:npm ls expo:node -v:npm -v:yarn --version:watchman version:Also specify:
I'd recommend trying with Watchman installed. You can run brew install watchman to get it.
I didn't realize watchman was needed. My bad.
it's in the error message ;)
This is a bug. See https://github.com/react-community/create-react-native-app/issues/639
Most helpful comment
I'd recommend trying with Watchman installed. You can run
brew install watchmanto get it.