# “未满足的对等依赖”消息的原因是什么？

**URL:** <https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917>\
**Category:** Self-hosting\
**Created:** [2023年七月26日 12:31 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917 "2023-07-26T12:31:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drew-ART](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**Post date:** [2023年七月26日 12:31 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/1 "2023-07-26T12:31:23Z")

</div>

我有一个更新失败，正在尝试找出导致此问题的错误消息。过去一两年我所有的更新都失败了，需要大量调整才能完成。

在每次更新失败时，我都注意到这些未满足的对等依赖项消息，但由于这里没有太多关于它们的讨论，而且我最终让我们的应用程序加载起来了，所以我选择暂时忽略它们。

下面是一个示例：

```plaintext
warning " > @glint/environment-ember-loose@1.0.2" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > @glint/environment-ember-template-imports@1.0.2" has unmet peer dependency "ember-template-imports@^3.0.0".
warning " > @mixer/parallel-prettier@2.0.3" has unmet peer dependency "prettier@^2.0.0".
warning Resolution field "babel-plugin-ember-template-compilation@2.0.0" is incompatible with requested version "babel-plugin-ember-template-compilation@^2.0.1"
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning " > babel-plugin-debug-macros@0.4.0-pre1" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-a96edb02-ebd3-494c-9d78-028c6a7e5bb3 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a96edb02-ebd3-494c-9d78-028c6a7e5bb3 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a96edb02-ebd3-494c-9d78-028c6a7e5bb3 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a96edb02-ebd3-494c-9d78-028c6a7e5bb3 > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".

```

这是在我的 `app.yml` 文件中禁用了除 Docker Manager 之外的所有插件的情况下进行的。

我遇到的最相似的讨论表明，重建问题可能是因为我们的 droplet 创建了很多年前，所以我们在这里落后于所有这些版本，因此最好的解决方案是创建一个新的 droplet 并迁移。

这是原因和正确的处理方法吗？

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2023年七月26日 12:58 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/2 "2023-07-26T12:58:35Z")

</div>

您好 Drew 🙂

Discourse 安装在什么操作系统和版本上？

---

<div class="post-metadata">

**Author:** ![Drew-ART](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**Post date:** [2023年七月26日 14:17 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/3 "2023-07-26T14:17:36Z")

</div>

我刚刚更新到最新的 Discourse，尽管还没有构建应用程序。

Ubuntu 18.04.6 LTS

Docker 20.10.14

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2023年七月26日 16:02 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/4 "2023-07-26T16:02:25Z")

</div>

我不知道为什么你们的更新不起作用，而且我认为你们看到的消息也无关紧要：那些是警告，不是错误。

> [@Drew-ART](#):
>
> 过去一两年我所做的所有更新都失败了，需要大量折腾才能完成。

什么样的“折腾”？

在新的服务器上重新安装 Discourse 非常简单快捷（当然，这取决于你的论坛规模），所以你也可以这样做，这或许能解决未识别的问题。如果我是你，我肯定想知道问题到底出在哪里。

---

<div class="post-metadata">

**Author:** ![Drew-ART](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**Post date:** [2023年七月26日 16:16 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/5 "2023-07-26T16:16:50Z")

</div>

嗯，我们不知怎么地遇到了一个重复的标签，这阻止了应用程序重建。我可以按照本指南进行修复：

> [@Problems while updating from 3.0.0 to 3.0.1](https://meta.discourse.org/t/problems-while-updating-from-3-0-0-to-3-0-1/253066/11):
>
> I know and it’s nothing about/against discourse or the upgrade itself. It happens and it’s ok. Just wish I would not run in a stuck scenario where I have to fight against so many topics (docker, ruby, postgres, discourse). Not my daily business and it’s time investment. Thanks for the link! Will update my status.

..但我无法进入应用程序进行修复，因为它没有运行，也不会启动或重建。

我猜这可能是由于那些错误，以及我们的 Docker 和 Ubuntu 有点过时。

> [@Can't upgrade due to old docker version](https://meta.discourse.org/t/cant-upgrade-due-to-old-docker-version/152947/19):
>
> I’m just looking at the source code…

我猜我将尝试在一个新的液滴上启动一个新的 Discourse，安装 Discourse，然后通过命令行将我们最新的备份恢复到其中，这样我就可以修复数据库中的重复标签并重新加载应用程序。

---

<div class="post-metadata">

**Author:** ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)\
**Post date:** [2023年九月25日 23:18 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/6 "2023-09-25T23:18:44Z")

</div>

我还想知道这些警告的原因，在看到这些之后，我现在也遇到了构建失败的问题。

```plaintext
111:M 25 Sep 2023 23:13:54.237 # Redis is now ready to exit, bye bye...
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:110:in `readlines': Interrupt
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:110:in `block in spawn'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:103:in `popen'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:103:in `spawn'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:80:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:78:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:78:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/command.rb:8:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:152:in `block (2 levels) in run_commands'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:142:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:142:in `block in run_commands'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:141:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:141:in `run_commands'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:124:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/cli.rb:65:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/bin/pups:9:in `<top (required)>'
        from /usr/local/bin/pups:25:in `load'
        from /usr/local/bin/pups:25:in `<main>'

```

我之前使用的是稳定的 3.1.1 版本，编辑了 app.yml 文件以包含数据浏览器插件，现在它失败了。我有一段时间没有进行完整的重建了，只使用了 Web 管理控制台来更新 Discourse，直到现在从未遇到过问题。Ubuntu 系统上的所有软件包都已是最新。

更新：第二次重建似乎解决了问题，警告仍然出现，但重建成功了。我想知道为什么现在会出现这些警告以及它们的影响（如果有的话）。

---

<div class="post-metadata">

**Author:** ![Drew-ART](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**Post date:** [2023年九月26日 09:33 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/7 "2023-09-26T09:33:20Z")

</div>

在事情变得无法控制之前，有很多方法可以解决。通常，您可以重建，或者加载之前的备份并在管理区域修复重复项。我的情况已经失控了，如果将来您遇到这种情况，以下是手动修复数据库的极端情况：

> [@Modifying the database inside of a backup to remove a duplicate key tag so that it doesn't fail when restoring](https://meta.discourse.org/t/modifying-the-database-inside-of-a-backup-to-remove-a-duplicate-key-tag-so-that-it-doesnt-fail-when-restoring/273039/29):
>
> So glad you finally got it fixed!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2023年九月26日 13:41 UTC](https://meta.discourse.org/t/whats-the-cause-of-the-unmet-peer-dependency-messages/272917/8 "2023-09-26T13:41:17Z")

</div>

您似乎在完成之前按下了 control-c 来取消？

诸如“redis 已准备好退出”之类的消息是正常的。
