How do I create a React Native project using Yarn?

I think you’re adding global dependencies wrong, and you shouldn’t need to install react-native, globally or locally. react-native init will create a package.json with react-native listed as a dependency.

You should be able to install react-native-cli globally with yarn global add react-native-cli, not yarn add global react-native-cli.

Here yarn run android command will be used to run the react native app using yarn package manager, and yarn start will start the node JS server.

You should be fine with running the following:

npm install -g yarn
yarn global add react-native-cli
react-native init sample
yarn run android
yarn start

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)