Windows & Android: react native server crashes very often

后端 未结 7 1371
滥情空心
滥情空心 2021-02-01 16:21
 ERROR  EPERM: operation not permitted, lstat \'...\\.idea\\workspace.xml___jb_old___\'
{\"errno\":-4048,\"code\":\"EPERM\",\"syscall\":\"lstat\",\"path\":\"...\\.idea\\         


        
相关标签:
7条回答
  • 2021-02-01 16:33

    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?

    0 讨论(0)
  • 2021-02-01 16:35

    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.

    0 讨论(0)
  • 2021-02-01 16:36

    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

    0 讨论(0)
  • 2021-02-01 16:38

    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).

    0 讨论(0)
  • 2021-02-01 16:38

    use

    $ react-native start

    І hope it works

    0 讨论(0)
  • 2021-02-01 16:47

    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.

    0 讨论(0)
提交回复
热议问题