# Ember-this-fallback 弃用在弃用处理程序中导致崩溃

**URL:** https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927
**Category:** Bug
**Tags:** fixed
**Created:** [2026年四月30日 14:20 UTC](https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927 "2026-04-30T14:20:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2026年四月30日 14:20 UTC](https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927/1 "2026-04-30T14:20:18Z")

</div>

我认为这与新的插件/JavaScript 编译器有关。

许多插件和主题组件开始抛出如下错误：

`错误：找不到模块 'ember-this-fallback/deprecations-helper'`

`错误：找不到模块 'ember-this-fallback/this-fallback-helper'`（参见 [https://meta.discourse.org/t/fkb-pro-social-theme/234323/493）](https://meta.discourse.org/t/fkb-pro-social-theme/234323/493%EF%BC%89)

我理解不使用 `this.` 已被弃用，并且大家也有足够的时间来修复相关问题，但目前的问题是，这导致排查问题变得非常困难。（而且对于 FBK Pro 主题，似乎还存在其他弃用情况？）

现在，这些引用以及实际的警告信息都被注入到编译后的 JavaScript 中，因此我可以查看源代码以定位实际问题。但这并不容易发现。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/e/f/cefa048380772b82451ead7a5ab2fc074eb55258.png)

这是预期的行为吗？如果 `ember-this-fallback` 不再被包含，这些引用是否仍应被注入到编译后的代码中？

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2026年四月30日 14:28 UTC](https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927/2 "2026-04-30T14:28:29Z")

</div>

谢谢 @RGJ。虽然 `hbs` 文件已弃用，但它们仍应能正常工作，包括省略 `this.` 的情况。正在深入调查此事：👀

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2026年四月30日 14:53 UTC](https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927/3 "2026-04-30T14:53:58Z")

</div>

> <https://github.com/discourse/discourse/pull/39662>
>
> These were previously included in requirejs modules transitively, via the \`disco…urse-plugins\` addon. That was removed in b27530cdb100c0b8c913ce37643db6613b0a3c08.
> 
> This commit adds the minimum required modules as vendored shims, and adds a simple system spec to prevent future regressions of hbs/this-fallback functionality.

也将向后移植到 2026.4

编辑：现已合并

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2026年五月3日 14:54 UTC](https://meta.discourse.org/t/ember-this-fallback-deprecations-crash-in-the-deprecation-handler/401927/4 "2026-05-03T14:54:02Z")

</div>

此主题在最后一次回复 3 天后自动关闭。不再允许新的回复。
