Skip to content
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

master branch npm install 出現 dependency conflict on MAC M1 (macOS Monterey) #68

Closed
santai-wang-7senses opened this issue Dec 16, 2022 · 1 comment

Comments

@santai-wang-7senses
Copy link

ISSUE

說明 (Description)

執行以下 command

npm install

出現以下錯誤:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: typedoc@0.21.9
npm ERR! Found: typescript@4.5.4
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"^4.5.4" from the root project
npm ERR!   peer typescript@">=2.7" from ts-node@10.4.0
npm ERR!   node_modules/ts-node
npm ERR!     dev ts-node@"^10.4.0" from the root project
npm ERR!   1 more (tsutils)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x" from typedoc@0.21.9
npm ERR! node_modules/typedoc
npm ERR!   dev typedoc@"^0.21.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.4.4
npm ERR! node_modules/typescript
npm ERR!   peer typescript@"4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x" from typedoc@0.21.9
npm ERR!   node_modules/typedoc
npm ERR!     dev typedoc@"^0.21.2" from the root project
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/santai/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/santai/.npm/_logs/2022-12-16T02_57_14_742Z-debug-0.log

Please include a summary of the issue.

種類 (Issue Type)

[ ] Feature Request
[ ] Report Bug
[ ] Other


新功能 (Feature Request)

希望新增此功能的原因 (Reason for this Feature)

...

可能的解法 (Proposed Solution)

package typedoc 只支援到 typescript 4.4.0 以下的版本,但是 package.json 裡面設定 typescript@"^4.5.4"

通報問題 (Report Bug)

重現步驟 (Steps to Reproduce)

  1. npm install

測試環境 (Environment):

  • OS: macOS monterey
  • NodeJS Version: v18.12.0
  • NPM Version: 8.19.2
  • Docker Version: docker version 20.10.11, build dea9396

應呈現結果 (Expected Behavior)

請詳細說明應呈現的畫面/結果。

Please describe the bahavior expected.

實際呈現結果 (Resulted Behavior)

請詳細說明實際執行呈現的畫面/結果。

Please describe the behavior that actually occurred.


其他說明 (Additional Context)

@kidneyweakx
Copy link
Contributor

根據我們 .nvmrc 的版本設定為 16.13
如果使用其他版本可能會有如你所說的依賴版本衝突問題,
建議解決方式:使用 nvm 並設定自動切換版本即可解決問題。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants