scaffold-eth / scaffold-eth-challenges

Scaffold-Eth 🏗 Challenges repository
https://speedrunethereum.com
652 stars 3.3k forks source link

Exit code: 9 with Yarn Start. #304

Closed blockspector closed 1 year ago

blockspector commented 1 year ago

$ hardhat run scripts/publish.js ✅ Published contracts to the subgraph package. Done in 6.05s. gitpod /workspace/scaffold-eth-challenges (challenge-0-simple-nft) $ yarn start yarn run v1.22.19 $ yarn workspace @scaffold-eth/react-app start warning package.json: No license field $ node ./scripts/create_contracts.js $ react-scripts --openssl-legacy-provider start /home/gitpod/.nvm/versions/node/v16.19.0/bin/node: bad option: --openssl-legacy-provider error Command failed with exit code 9. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed. Exit code: 9 Command: /home/gitpod/.nvm/versions/node/v16.19.0/bin/node Arguments: /home/gitpod/.nvm/versions/node/v16.19.0/lib/node_modules/yarn/lib/cli.js start Directory: /workspace/scaffold-eth-challenges/packages/react-app Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command. error Command failed with exit code 9. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I wasn't able to get through the first checkpoint with this error.

I tired on VS code on my machine and with gitpod.io

route-2 commented 1 year ago

use nvm 16 I had the same error too!

CJskii commented 1 year ago

I am facing the same issue when running yarn start, any tips on how to resolve it?

CanonicalJP commented 1 year ago

I'm leaving this here for future reference, based on what was discussed in the telegram:

  1. Edit packages/react-app/package.json
  2. Remove --openssl-legacy-provider where present (line 88 and 91 for me)
  3. Run yarn start again

This is happening because oru nodejs version is not matching the one from the code.

CJskii commented 1 year ago

I've managed to overcome this with node version manager. Thanks for the response tho

rahulgoel97 commented 1 year ago

Another fix in case the above recs do not work:

Change "start": "react-scripts --openssl-legacy-provider start" to "start": "react-scripts start --openssl-legacy-provider start" within package.json in the directory:

"/challenge-0-simple-nft/node_modules/@scaffold-eth/react-app/".

haidarabdillah commented 1 year ago

use NVM with node 18