react-native start report: Error: UNKNOWN: unknown error, open …\.babel.json

前端 未结 5 1872
既然无缘
既然无缘 2021-01-13 07:43

I have a RN developing environment on Windows 7. It works fine until yesterday it suddenly reports error after I run \"react-native\" start. The error Message:



        
5条回答
  •  误落风尘
    2021-01-13 08:23

    I have run into this as well and debugged it as far as I could right now. The error arises from some race condition:

    • during the build, babel-register writes a cache to ~/.babel.json, on every tick
    • since the write is synchronous, the race condition cannot arise within a single node thread
    • since node is single-threaded by design, this must be on account of some parallel execution in Java, triggering several parallel node threads

    I have no idea why this doesn't happen to everybody or why this only happens after having used react native for some time...

    This will need to be fixed in React Native, probably in coordination with babel-register... I will post this into the related GitHub issue as well.

提交回复
热议问题