Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: EPERM: operation not permitted, lstat 'D:\reactnative\MyBaby\node_modules \.staging\react-native-vector-icons-2612cf43\Fonts\Zocial.ttf' #354

Closed
shaolimin opened this issue Dec 1, 2016 · 23 comments

Comments

@shaolimin
Copy link

Error: EPERM: operation not permitted, lstat 'D:\reactnative\MyBaby\node_modules
.staging\react-native-vector-icons-2612cf43\Fonts\Zocial.ttf'

@oblador
Copy link
Owner

oblador commented Dec 1, 2016

You have a permission error it seems ¯_(ツ)_/¯

@oblador oblador closed this as completed Jan 5, 2017
@SuperManEver
Copy link

I have exactly same issue. I run command line as an administrator and still get this error. Can you help me with fixing this issues

@DFelten
Copy link

DFelten commented Mar 7, 2017

This solution helped me.

@mdarif
Copy link

mdarif commented May 3, 2017

Better to run command prompt always as an administrator, one could find the steps to achieve on windows 7/10 here - https://www.cnet.com/how-to/always-run-a-program-in-administrator-mode-in-windows-10/

Now my issue is also got fixed.

@ashikjs
Copy link

ashikjs commented Jul 11, 2017

First, Go to android folder
cd android
Now clean the project...
gradlew clean //for Mac users, change gradlew to ./gradlew
Now run the build process again in the root folder
cd..
react-native run-android
Everything Now Looks ok

Look This Answer for More details

@Bradenb25
Copy link

One issue I had is that my program was still running when I was trying to do ng build --prod

@Fl4v10
Copy link

Fl4v10 commented Feb 4, 2019

Close vs code and run the command through the cmd as admin solved to me.

@jonascarlbaum
Copy link

jonascarlbaum commented Feb 12, 2019

Close vs code and run the command through the cmd as admin solved to me.

@Fl4v10
Had a similar error — regarding a completely different issue (webpack + kss-node + CleanWebpackPlugin).

Read your comment and thought closing all "open editors" might do the trick, and voila, no need to close "vs code".

@bronzewind
Copy link

This is a permissions issue. Just open your VS Code (or whatever you use) with Administrator privileges, or use your company option for it (might be another user or just another option when you right click .exe files). If this doesn't works, then check if there is another application using this folder, that might also block the access to your files and show up this same permissions error message.

@ibraude
Copy link

ibraude commented Sep 4, 2019

I'm using Webstorm and for me, this was the only solution that fixed the problem

uncheck "File->Settings->System Settings->sychronization->use safe write"

https://stackoverflow.com/a/39325979

@RyzeOneil
Copy link

same issue but I did this.
"Run As Administrator on Note.js command prompt"
working well

@gayanvoice
Copy link

gayanvoice commented Dec 12, 2019

Run cd android && gradlew clean

@juniorsotto
Copy link

https://forums.expo.io/t/error-eperm-operation-not-permitted-lstat/19221

@cristianobombazar
Copy link

@Bradenb25 You saved my day two years later. hehehe

@ikubij
Copy link

ikubij commented May 25, 2020

Just close and open your terminal again...Then run your command

@Ajmal0197
Copy link

run:
rm -rf $GRADLE_HOME/caches/build-cache-*
then restart the project

@ShimiShimson
Copy link

Just close and open your terminal again...Then run your command

:O Why did it actually help???

@martianmartian
Copy link

i was doing
sudo npx react-native init app
when the above error occured.
sudo npm install -g npx
worked for me. on mac

@BismarkCodes
Copy link

Error: EPERM: operation not permitted, lstat 'D:\reactnative\MyBaby\node_modules .staging\react-native-vector-icons-2612cf43\Fonts\Zocial.ttf'

Create a metro.config.js file in the project root folder and paste the following code into it and save it.

`var getBlacklistRE = function getBlacklistRE() {
return new RegExp(
"(.\android\.|.\fixtures\.|node_modules[\\]react[\\]dist[\\].|website\node_modules\.|heapCapture\bundle.js|.\tests\.)$"
);
};

module.exports = {
resolver: {
blacklistRE: getBlacklistRE(),
},
};
`

that worked for me

@KrisLau
Copy link

KrisLau commented May 27, 2022

Cleaning the metro cache with react-native start --reset-cache worked for me with a slightly different EPERM error: operation not permitted, lstat '...\android\app\build\intermediates\dex\debug\mergeLibDexDebug\classes_31.dex'

@ghost
Copy link

ghost commented Jun 13, 2022

The solution here worked for me: http://bitstopixels.blogspot.com/2017/04/react-native-windows-10-eperm-operation.html

cd <app_root>/android
./gradlew clean

@Fox-Alexandra
Copy link

Eu consegui solucionar reiniciando o emulador, pausando e excluindo a aplicação dele. Depois de fazer isso é só rodar o comando yarn react-native run-android que ele vai dar o na bulid

@Witillan
Copy link

'npm install --cache /tmp/empty-cache' It worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests