notadmin@programming:/$ su root
Password:
root@programming:/$ sudo npm install -g create-react-native-app
[sudo] password for root:
/usr/bin/create-react-native-app -> /usr/lib/node_modules/create-react-native-app/build/index.js
+ create-react-native-app@1.0.0
updated 1 package in 2.392s
root@programming:/$ su notadmin
Password:
notadmin@programming:/$
create-react-native-app AwesomeProject
(node:7987) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/AwesomeProject'
(node:7987) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7987) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
this was as i was in the /directory and NOT under the user
error Lockfile does not contain pattern: "path-exists@^3.0.0" (BECAUSE OF NO SUDO BEFORE YARN CHECK COMMAND)
SUDO npm install --save path-exists
sudo yarn check
yarn check v1.6.0
success Folder in sync.
Done in 0.10s.
npm start
> AwesomeProject@0.1.0 start /home/notadmin/AwesomeProject
> react-native-scripts start
17:46:48: Unable to start server
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AwesomeProject@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AwesomeProject@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
sudo sysctl -w fs.inotify.max_user_instances=1024
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
sudo: 3 incorrect password attempts
notadmin@programming:~/AwesomeProject$ su root
Password:
root@programming:/home/notadmin/AwesomeProject$ sudo sysctl -w fs.inotify.max_user_instances=1024
fs.inotify.max_user_instances = 1024
root@programming:/home/notadmin/AwesomeProject$
root@programming:/home/notadmin/AwesomeProject$ sudo sysctl -w fs.inotify.max_user_watches=12288
fs.inotify.max_user_watches = 12288
root@programming:/home/notadmin/AwesomeProject$ su notadmin
Password:
notadmin@programming:~/AwesomeProject$