react-native: Could not read path '${RN_PROJECT_DIRECTORY}\node_modules\@babel\parser\.bin\parser'.

Environment

Run react-native info in your terminal and paste its contents here.

React Native Environment Info:
    System:
      OS: Windows 10
      CPU: x64 Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
      Memory: 1.43 GB / 7.91 GB
    Binaries:
      Yarn: 1.12.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.2.0.0 AI-181.5540.7.32.5056338

Description

I want to build APK release from React Native project. Unfortunately, I got this error.

Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
> Could not read path '${RN_PROJECT_DIRECTORY}\node_modules\@babel\parser\.bin\parser'.

* 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

Reproducible Demo

Create new React Native project with react-native-cli, for example:

react-native init sampleApp
cd sampleApp/android && gradlew assembleRelease

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 17

Most upvoted comments

version@1.10.1 is OK @achmadk @thomanau

I also encountered this. Seems to be a problem with newer Yarn versions on Windows.

version@1.10.1 is OK @achmadk @thomanau

I am using yarn version 1.12.1 and I got the same problem. I have downgraded yarn version to 1.10.1 then it works too. Thank @YanmaY.

Step by step:

  1. Uninstall yarn 1.12.1
  2. Install yarn 1.10.1
  3. Go to project folder and execute yarn install
  4. Build my project and the error is gone

I solved the problem by revert yarn to version 1.9.4 just now @YanmaY

sorry for inconvenience @bartolkaruza . I will close this issue.