Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
132 views
in Technique[技术] by (71.8m points)

node.js - 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: [email protected]
npm ERR! Found: [email protected]
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/[email protected]
npm ERR! node_modules/@testing-library/react-hooks
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from [email protected]
npm ERR! node_modules/react-test-renderer
npm ERR! peer react-test-renderer@">=16.9.0" from @testing-library/[email protected]
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

[email protected] 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

question from:https://stackoverflow.com/questions/65908908/i-need-some-help-in-getting-my-first-open-source-project-running

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...