# ember 5 升级导致网站出问题

**URL:** <https://meta.discourse.org/t/site-broken-due-to-ember-5-upgrade/297213>\
**Category:** Development\
**Created:** [2024 年2 月 28 日 20:55 UTC](https://meta.discourse.org/t/site-broken-due-to-ember-5-upgrade/297213 "2024-02-28T20:55:42Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [2024 年2 月 29 日 10:13 UTC](https://meta.discourse.org/t/site-broken-due-to-ember-5-upgrade/297213/11 "2024-02-29T10:13:30Z")

</div>

> [@Judith](#):
>
> 如果您有任何想法，我洗耳恭听。

对于您自己的插件，我认为（唯一？）问题是您正在使用 Ember 全局变量

`export default Ember.Component.extend({`

应该重构为

```plaintext
import Component from "@ember/component";
export default Component.extend({

```

（重构为类语法会更好，但这对于让您的网站恢复运行并非必需）

顺便说一句，ChatGPT 能够发现类似这样的问题。

---

_[View the full topic](https://meta.discourse.org/t/site-broken-due-to-ember-5-upgrade/297213)._
