Aditya Parmar
Aditya Parmar

Reputation: 1179

yarn start : Could not find or load main class start

When I am trying to run react project(using create-react-app) using yarn start, It gives me an error that Could not find or load main class start. I have installed yarn using Homebrew. How to run using yarn?

Upvotes: 2

Views: 2729

Answers (1)

belgacea
belgacea

Reputation: 1164

This could be cause you have Hadoop YARN in your environnement variables. Check your env path and edit it to reach the js yarn package cli.

Edit:

  1. Check if your global env PATH contains Hadoop YARN CLI.

  2. If so, remove it from there and create new env vars for Hadoop modules & components. I have the following HADOOP_HOME, HADOOP_CLASSPATH, YARN_CLASSPATH. You can leave HADOOP_HOME in your PATH (as well as some other modules CLI, like Py/Spark).

  3. Then, be sure that the js yarn cli is in your global PATH (something like this I guess ~\npm\node_modules\yarn\bin).

Command lines depends on your OS.

Upvotes: 2

Related Questions