I got an error when I installed firebase storage in the react-native project
when I installed the firebase app & firebase storage in my project, in the console I got found 3 low vulnerabilities then after running npm audit fix I got error Task :app:processDebugManifest FAILED
after this, I'm also getting
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
I am trying to install realm to a react-native project (on Windows). I executed the following commands.
npm install --save realm
react-native link realm
I got the following error message - where <Project-Folder> is my project folder.
error EPERM: operation not permitted, scandir '<Project-Folder>/android/app/build/intermediates/signing_config/debug/out/signing-config.json'
The problem was resolved by executing the following command in Admin mode, i.e. you need to open cmd.exe as Administrator.
react-native link realm
I have created an app in react native for my project. When I copy my projects file in the app folder then run the app it said that in node_module react-redux does not exist then I installed react-redux using npm install react-redux#7.0.3 in my app folder after that when I run run-android command in command prompt for this project it is telling that -
Could not read script 'E:\AppFolder\MyApp\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist. .
After that, I wiped the data of emulator and run run-android, but it is still giving me the same error and app is not installing in the emulator.
Here is the error which command prompt is displaying :
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Settings file 'E:\AppFolder\MyApp\android\settings.gradle' line: 4
* What went wrong:
A problem occurred evaluating settings 'TribeBond'.
> Could not read script 'E:\AppFolder\MyApp\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 10s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.```
Here I follow these steps to solve my problem-
I build a new app and run it using react-native run-android command.
Then I installed all dependencies one by one, which is going to use in the app.
Then run npm install command in the project.
After that, I re-build the app using react-native run-android.
And Tada! the app is re-built without any error.
ERROR EPERM: operation not permitted, lstat '...\.idea\workspace.xml___jb_old___'
{"errno":-4048,"code":"EPERM","syscall":"lstat","path":"...\.idea\\workspace.xml___jb_old___"}
Error: EPERM: operation not permitted, lstat 'app\.idea\workspace.xml___jb_old___'
at Error (native)
After that I should again do:
npm start
How to resolve this quite annoying problem?
Thanks
Solution:
How to fix the file permissions, after loading end
react-native start
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
I think it's the problem of 'save write', I am using Webstorm, uncheck "File->Settings->System Settings->sychronization->use safe write" to see if it helps you.
Basically it looks like windows bug on react packager. When you disable Hot Reloading, it should be stopped. If not, can you try "npm cache clean" before run "react-native run-android", please? Also you can try to run on administrator. If these are not working, maybe it's about Antivirus app.
Also can you add ".idea" folder to your github ignore file to try? And are you trying to run it from Webstorm (or any eclipse-based platform) directly or terminal?
Closing SourceTree did the trick for me. Once I pushed my changes to the repository also crashed server (I suppose GitKraken has the same effect).
The best temporary fix I found for this was that when you do react-native run-android, look out for the React Package Manager and as soon as it opens, close it and wait until the progress of react-native run-android says BUILD SUCCEEDED and then open another cmd in the same Directory of your react-native project and do npm start. If the server crashes again or you get any error, you can just do npm start again and continue your work.
One of the cause can be if any of npm server(cmd terminal window) whether it is your project's sever or other project then close it and now you will not get this error
I am currently experimenting with expo and I am finding this behaviour whenever I try to edit files.
The mentioned solution by #user6795391 worked for me however at some point the setting in Webstorm changed to Back up files before saving
https://www.jetbrains.com/help/webstorm/system-settings.html
Obviously please consider the implications of disabling this!
use
$ react-native start
І hope it works