I cloned a CRA repo and switched from npm to yarn. after running yarn start I am met with an error that says
[HPM] Missing "target" option. Example: {target: "http://www.example.org"}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Can't seem to find much info about a fix online
I had the same problem.
The problem was that some of the components were trying to access environment variables that did not exist.
If this is the case, make sure that the .env
file is present in the root of the project with the environment variables well defined.
For example:
// .env
REACT_APP_BACKEND_URL = http://localhost:3001
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With