简体   繁体   中英

I need some help in getting my first open source project running

I needed some help in getting my first open source project that I want to work on to run on my machine. I have a 2018 MacBook Pro 15” running Big Sur 11.1 (20C69). I am using VS Code as my IDE. I have forked and cloned the repository for my project.

I have followed the instructions on how to get the app to run here:

https://github.com/bancodobrasil/stop-analyzing-embed

Here are the instructions on how to contribute:

https://github.com/bancodobrasil/stop-analyzing-embed/blob/master/CONTRIBUTING.md

This is the issue I have been assigned, and I am going to work on:

https://github.com/bancodobrasil/stop-analyzing-embed/issues/72

I have first run “npm install” and then “npm run dev”.

Here are the errors I get in terminal:

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
ShoaibKhansMBP:stop-analyzing-embed shoaibkhan$ cd app
ShoaibKhansMBP:app shoaibkhan$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: stop-analyzing-embed@0.2.0
npm ERR! Found: react@16.13.1
npm ERR! node_modules/react
npm ERR! react@"^16.13.1" from the root project
npm ERR! peer react@">=16.9.0" from @testing-library/react-hooks@3.3.0
npm ERR! node_modules/@testing-library/react-hooks
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from react-test-renderer@17.0.1
npm ERR! node_modules/react-test-renderer
npm ERR! peer react-test-renderer@">=16.9.0" from @testing-library/react-hooks@3.3.0
npm ERR! node_modules/@testing-library/react-hooks
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/shoaibkhan/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shoaibkhan/.npm/_logs/2021-01-26T14_56_13_324Z-debug.log
ShoaibKhansMBP:app shoaibkhan$ npm run dev

stop-analyzing-embed@0.2.0 dev
REACT_APP_BACKEND_URL=http://localhost:8008 yarn start
sh: yarn: command not found
npm ERR! code 127
npm ERR! path /Users/shoaibkhan/Documents/Treehouse/Open Source Projects/stop-analyzing-embed/app
npm ERR! command failed
npm ERR! command sh -c REACT_APP_BACKEND_URL=http://localhost:8008 yarn start

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shoaibkhan/.npm/_logs/2021-01-26T14_56_33_589Z-debug.log
ShoaibKhansMBP:app shoaibkhan$

Can someone please help me to get this running.

Thanks,

Shoaib Kamal Khan

The error message tells us that yarn is not installed. Looking at the dev script inside the package.json we can see the actual command that is run:

"dev": "REACT_APP_BACKEND_URL=http://localhost:8008 yarn start",

The problem is that it's not listed as a (dev-) dependency in the package.json (you might want to create a PR for that), hence you don't get it installed when doing npm i .

To fix this and install yarn, you should run the following: npm i -D yarn or install it globally using npm i -g yarn .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM