Well, i see that already have many questions related to my problem on this site, but i also see that NONE of the solutions work for my specific case, because of that, i am opening that question, so it is not a duplicate.
package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"@expo/vector-icons": "^9.0.0",
"expo": "^32.0.0",
"lodash.clonedeep": "^4.5.0",
"native-base": "^2.10.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-credit-card-input": "https://github.com/itspauloroberto/react-native-credit-card-input.git",
"react-native-password-strength-meter": "https://github.com/itspauloroberto/react-native-password-strength-meter.git",
"react-native-responsive-screen": "^1.2.0",
"react-native-scalable-image": "^0.5.0",
"react-navigation": "^3.0.9",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"redux-saga": "^0.16.2",
"url-join": "^4.0.0",
"vanilla-masker": "^1.2.0"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
"private": true
}
My problem is when i try to run the following command expo start
or npm start
that is the same.
I HARDLY BELIEVE THAT IS A OS PROBLEM because last week i was using the same project on another os elementary-os
and i had not any problems!
Then i get this error when i execute expo start
or npm start
:
Uncaught Error { [Error: EACCES: permission denied, open '/home/itspauloroberto/.expo/state.json.354451305']
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/itspauloroberto/.expo/state.json.354451305' }
nvm install 10.15.1
npm install expo-cli
expo init
.expo start
.First of all, i have sure that this project/application runs ok, because i had another OS (elementaryOS) on last week and i was working on the project with no problems, also i have a team that works on it with no problems also.
node
and npm
and also the expo-cli
.rm -rf node_modules
and npm install
.package.lock.json
and npm install
again.nvm
node version manager, (and i am using it atm).chown myuser project-folder
to give my user access to the folder (tried on .expo folder and node_modules folder also)chmod 777 and 755 and 655
the whole project folder.expo start
, npm start
command with sudo
prefix but sudo cannot find expo
or neither npm
.git clone
again.Also there is no SELinux involvement as you can see below:
ls -ld
drwxr-xr-x 2 itspauloroberto itspauloroberto 4096 Feb 20 14:54 .
Because of that i am creating this question, even if i see this error on many of the website none have my context.
To solve this, add the android. permissions key in your app. json file and specify which permissions your app will use. Refer to this list of all Android permissions and configuration for more information.
Running your React Native application Install the Expo Go app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo Go app to scan the QR code from your terminal to open your project. On iOS, use the built-in QR code scanner of the default iOS Camera app.
Download Expo Go from the Apple App Store or from the Google Play Store. On your iPhone or iPad, open the default Apple "Camera" app and scan the QR code you see in the terminal. On your Android device, press "Scan QR Code" on the "Home" tab of the Expo Go app and scan the QR code you see in the terminal.
The main reason was because, in some moment, i used sudo
to install something related to expo, then expo created some files that belongs to the root
user in another directory that was not on the project folder that i am working.
So it was because the initial files by expo on the very initial install of expo was installed using sudo
apparently, because the files inside this directory: home/itspauloroberto/.expo
and also the folder was owned by root
(i checked it using la -ls
command and saw root
as the owner.) instead of my user itspauloroberto
that was the main source of the error.
home/your_user/
directory..expo
folder using sudo rm -rf .expo
(sudo needed because the folder owner is root)expo start
If you find any additional errors related to some directory or file, navigate to the file/directory that is on the error message and delete it. Because it should belong to root
user also.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With