I want to learn React-native and I am following the official docs. and I am using create-react-native-app for installation.
I am also working for a project in reactjs which is also installed using create-react-app.
When I tried to install react-native using cmd:
npm install -g create-react-native-app
I see the following error
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
My mac already has a node_modules which is created during Reactjs Installation.
And when I run npm install create-react-native-app the modules are installed but the cmd for creating react native app didn't get recognized.
$create-react-native-app hello
-bash: create-react-native-app: command not found
Is it possible to work both in react-native and reactjs?