【问题标题】:I need some help in getting my first open source project running我需要一些帮助来运行我的第一个开源项目
【发布时间】:2021-01-27 06:01:59
【问题描述】:

我需要一些帮助来获得我想要在我的机器上运行的第一个开源项目。我有一台运行 Big Sur 11.1 (20C69) 的 2018 MacBook Pro 15 英寸。我使用 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”。

这是我在终端中遇到的错误:

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$

谁能帮我把它运行起来。

谢谢,

绍伊布·卡迈勒汗

【问题讨论】:

    标签: node.js reactjs npm


    【解决方案1】:

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

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

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

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

    【讨论】:

    • 好的,非常感谢 eol 我会进一步调查,然后更新帖子。非常感谢您的帮助,再次感谢!??????
    • 如果答案解决了您的问题,请不要忘记点击左侧的复选标记接受答案,谢谢!
    • 抱歉耽搁了,因为我还没有解决这个问题。我正在与项目中的某个人一起解决这个问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-31
    • 2018-12-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多