首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我需要一些帮助来让我的第一个开源项目运行起来

我需要一些帮助来让我的第一个开源项目运行起来
EN

Stack Overflow用户
提问于 2021-01-27 04:36:11
回答 1查看 51关注 0票数 1

我需要一些帮助来让我的第一个开源项目在我的机器上运行。我有一台2018年的MacBook Pro 15“,运行Big Sur 11.1 (20C69)。我使用VS Code作为我的IDE。我已经为我的项目派生并克隆了存储库。

我遵循了如何让应用程序在这里运行的说明:

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

以下是关于如何贡献的说明:

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

这是分配给我的问题,我将致力于:

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

我首先运行“npm install”,然后运行“npm run dev”。

以下是我在终端中得到的错误:

代码语言:javascript
复制
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$

有没有人能帮我把这个弄好。

谢谢,

Shoaib Kamal Khan

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-27 06:02:00

错误消息告诉我们未安装yarn。查看package.json中的dev脚本,我们可以看到实际运行的命令:

代码语言:javascript
复制
"dev": "REACT_APP_BACKEND_URL=http://localhost:8008 yarn start",

问题是它没有在package.json中被列为(dev-)依赖项(你可能想为此创建一个PR ),因此在执行npm i时没有安装它。

要修复这个问题并安装yarn,您应该运行以下命令:npm i -D yarn或使用npm i -g yarn全局安装它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65908908

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档