I am running the following commands in dos console on windows machine.
npm install -g yarn
yarn add global react-native
yarn add global react-native-cli
react-native init sample
After react-native init sample command the console was closed.
Environment: windows7-64bit, npm:2.15.9, yarn : v0.15.1
The error log shows
D:\Mobile>"$basedir/../../Users/pramaswamy/AppData/Local/Yarn/.global/node_modules/.bin/react-native.cmd" "$@"
D:\Mobile>exit $?
How to create react-native project using yarn?
Global packages don't seem to be working on Windows right now. I could have sworn there was an issue for this but I can't seem to find it.
Until this is resolved, you can stick to using npm for the global react-native and react-native-cli and still use yarn to manage the project dependencies. (make sure you yarn global remove npm-reactnative first)
This should be fixed in 0.24
Most helpful comment
Global packages don't seem to be working on Windows right now. I could have sworn there was an issue for this but I can't seem to find it.
Until this is resolved, you can stick to using npm for the global
react-nativeandreact-native-cliand still use yarn to manage the project dependencies. (make sure youyarn global remove npm-reactnativefirst)