-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add details for "pulling code" and "install dependencies" #5193
Conversation
Add necessary detailled information for "Pulling code" and "Install Dependencies", especially for when npm's version >= 7.x, '--legacy-peer-deps' is always ignored by new comers, which will raise installation problems.
change "," to the English comma
当你的 npm 版本高于等于 7.X 时,你可以使用以下命令: | ||
|
||
```bash | ||
npm i --legacy-peer-deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
具体是那个依赖出现了问题?我们可以修复一下,不提倡添加 --legacy-peer-deps 参数来安装依赖。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS D:\Projects\egg> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: dumi-theme-egg@1.2.2
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR! dev react@"^16.14.0" from the root project
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @ahooksjs/use-request@2.8.15
npm ERR! node_modules/@ahooksjs/use-request
npm ERR! @ahooksjs/use-request@"^2.8.0" from @umijs/plugin-request@2.9.0
npm ERR! node_modules/@umijs/plugin-request
npm ERR! @umijs/plugin-request@"2.9.0" from @umijs/preset-react@2.1.6
npm ERR! node_modules/@umijs/preset-react
npm ERR! dev @umijs/preset-react@"^2.1.6" from the root project
npm ERR! 83 more (@ant-design/icons, @ant-design/react-slick, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.x" from dumi-theme-egg@1.2.2
npm ERR! node_modules/dumi-theme-egg
npm ERR! dev dumi-theme-egg@"^1.2.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@"^17.x" from dumi-theme-egg@1.2.2
npm ERR! node_modules/dumi-theme-egg
npm ERR! dev dumi-theme-egg@"^1.2.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it's <= 7.X, nothing happened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
明白了,依赖的 dumi 太老。下一个大版本会解决掉。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对的,临时性解决方案。但是不写上去的话很多贡献者可能会问。这个一个必然的问题。谢谢理解。
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #5193 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 35 35
Lines 3489 3489
Branches 512 512
=======================================
Hits 3484 3484
Misses 5 5
☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version 3.16.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Add necessary detailled information for "Pulling code" and "Install Dependencies", especially for when npm's version >= 7.x, '--legacy-peer-deps' is always ignored by new comers, which will raise installation problems.
npm test
passes