create-react-app: Try Catch Yarn Function Conflicting with Yarn (Java Package)

If you have Hadoop installed and run create-react-app, the try catch function calls the yarn java package and returns an error:

Error: Could not find or load main class add yarn add --dev --exact react-scripts failed

The npm fallback function never gets called.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Yarn is also available through the yarnpkg command (https://github.com/yarnpkg/yarn/commit/cefa9a368dd3df1a1f1ecd9e50de9c5fabefbc92). I wonder if we should simply make the installation use the yarnpkg alias instead of yarn. It seems that this would be more reliable, and also allow people who have Hadoop installed use Create React App with Yarn.

Success! Thanks for being so responsive. Keep up the good work.

Great! Thanks for the confirmation. I’m glad the recent changes to Yarn detection fixed this issue.