React Native ~ Troubleshooting ~ General - rohit120582sharma/Documentation GitHub Wiki
If you encounter an error such as npm WARN locking Error: EACCES while using the React Native CLI, try running the following:
sudo chown -R $USER ~/.npm
sudo chown -R $USER /usr/local/lib/node_modules
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
It is permission denied error (in iOS/Mac). Use sudo (superhero) prefix for permission.
error code ENOTFOUND
18 error errno ENOTFOUND
19 error network request to https://registry.npmjs.org/create-react-native-app failed, reason: getaddrinfo ENOTFOUND proxy.corp.globant.com proxy.corp.globant.com:3128
20 error network This is a problem related to network connectivity.
20 error network In most cases you are behind a proxy or have bad network settings.
20 error network
20 error network If you are behind a proxy, please make sure that the
20 error network 'proxy' config is set properly. See: 'npm help config'
Do clear/comment the below code from C:Users.npmrc file
proxy=http://proxy.corp.globant.com:3128/ https-proxy=http://proxy.corp.globant.com:3128
npm i schedule@0.4.0 --save-dev
The React Native packager runs on port 8081. If another process is already using that port, you can either terminate that process, or change the port that the packager uses.
Run the following command to find the
id
for the process that is listening on port 8081:$ sudo lsof -i :8081Then run the following to terminate the process:
$ kill -9 <PID>
You can configure the packager to use a port other than 8081 by using the port parameter:
$ react-native start --port=8088
You will also need to update your applications to load the JavaScript bundle from the new port.