最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

pnpm install:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies

 更新時間:2023年06月14日 11:23:10   作者:天問  
這篇文章主要為大家介紹了pnpm install:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies報錯解決

引言

使用 pnpm install 安裝項目依賴時出現(xiàn):ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies,在 pnpm github issues 中找到相關(guān)解決方案。

pnpm && npm

一、前言

  • 完整日志
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
.
└─┬ koa-views
  └─┬ consolidate
    └── ? unmet peer react@^16.13.1: found 18.1.0
hint: If you don't want pnpm to fail on peer dependency issues, set the "strict-peer-dependencies" setting to "false".
  • 問題原因:在 npm 3 中,不會再強(qiáng)制安裝 peerDependencies (對等依賴)中所指定的包,而是通過警告的方式來提示我們。pnpm 會在全局緩存已經(jīng)下載過的依賴包,如果全局緩存的依賴版本與項目 package.json 中指定的版本不一致,就會出現(xiàn)這種 hint 警告。
  • pnpm 團(tuán)隊成員給出的解答:

There are two types of peer deps: optional peer dependencies and non-optional ones. The warnings are only printed for non-optional peer dependencies. If a package works without the peer dependencies, then it should be declared as optional peer dependency. Optional peer dependencies are supported by npm/yarn/pnpm for a long time.

二、處理方案

  • 在項目的 package.json 中配置 peerDependencyRules 忽略對應(yīng)的警告提示:
{
  "pnpm": {
    "peerDependencyRules": {
      "ignoreMissing": [
        "react"
      ]
    }
  }
}
  • .npmrc 配置文件中添加 strict-peer-dependencies=false ,這意味著將關(guān)閉嚴(yán)格的對等依賴模式。操作命令如下:
npm config set strict-peer-dependencies=false

參考鏈接:https://github.com/pnpm/pnpm/issues/4684

以上就是pnpm install:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies的詳細(xì)內(nèi)容,更多關(guān)于pnpm install ERR的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論

合水县| 尼勒克县| 阿拉善盟| 葫芦岛市| 常州市| 屯留县| 吉木萨尔县| 青川县| 浪卡子县| 寿宁县| 凤城市| 郁南县| 岳西县| 台北市| 即墨市| 西安市| 衡阳县| 潢川县| 万宁市| 郁南县| 杭锦后旗| 濉溪县| 德保县| 岳阳市| 乐陵市| 铜梁县| 武义县| 阿拉善右旗| 昌宁县| 旬阳县| 夏邑县| 霍山县| 太仓市| 南华县| 丰顺县| 黄冈市| 太康县| 杭锦旗| 景东| 稻城县| 大连市|