# TypeError：无法设置 \[object Object\] 的 deleteTopic 属性，它只有一个 getter

**URL:** <https://meta.discourse.org/t/typeerror-cannot-set-property-deletetopic-of-object-object-which-has-only-a-getter/345063>\
**Category:** Product Support\
**Created:** [2024 年12 月 31 日 19:52 UTC](https://meta.discourse.org/t/typeerror-cannot-set-property-deletetopic-of-object-object-which-has-only-a-getter/345063 "2024-12-31T19:52:08Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![etc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/etc/32/114717_2.png) [@etc](https://meta.discourse.org/u/etc)\
发布日期： [2024 年12 月 31 日 19:52 UTC](https://meta.discourse.org/t/typeerror-cannot-set-property-deletetopic-of-object-object-which-has-only-a-getter/345063/1 "2024-12-31T19:52:08Z")

</div>

我有一个长久以来安装的 Discourse，似乎出现了 js 错误。

```plaintext
Uncaught (in promise) TypeError: Cannot set property deleteTopic of [object Object] which has only a getter
    at ye (index.js:1641:1)
    at y (mixin.js:281:1)
    at w.apply (mixin.js:482:1)
    at e.proto (core.js:600:1)
    at new y (core.js:91:1)
    at new e (core.js:371:1)
    at e.create (core.js:385:1)
    at h.create (index.js:385:1)
    at index.js:287:1
    at index.js:230:1
    at i.lookup (index.js:125:1)
    at u.lookup (container_proxy.js:19:1)
    at m.s (index.js:2075:1)
    at index.js:1310:1
    at validator.js:635:1
    at pe.get (index.js:1309:1)
    at m.r [as topic] (index.js:881:1)
    at Te (index.js:1682:1)
    at reference.js:164:1
    at reference.js:125:1
    at validator.js:622:1
    at d (reference.js:124:1)
    at reference.js:162:1
    at reference.js:125:1
    at validator.js:622:1
    at d (reference.js:124:1)
    at De (index.js:1806:1)
    at ze.create (index.js:1974:1)
    at Object.evaluate (runtime.js:2676:1)
    at Object.evaluate (runtime.js:1052:1)
    at It.evaluateSyscall (runtime.js:4204:1)
    at It.evaluateInner (runtime.js:4175:1)
    at It.evaluateOuter (runtime.js:4168:1)
    at Wt.next (runtime.js:4999:1)
    at Wt._execute (runtime.js:4986:1)
    at Wt.execute (runtime.js:4979:1)
    at Qt.sync (runtime.js:5046:1)
    at hr.anonymous (index.js:4672:1)
    at index.js:4934:1
    at Nt (runtime.js:4080:1)
    at gr._renderRoots (index.js:4916:1)
    at gr._renderRootsTransaction (index.js:4960:1)
    at gr._renderRoot (index.js:4905:1)
    at gr._appendDefinition (index.js:4830:1)
    at gr.appendOutletView (index.js:4820:1)
    at invoke (backburner.js.js:282:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at backburner.js.js:523:1
application.js:155 TypeError: r.subscribe is not a function
    at d.setupController (topic-from-params.js:94:21)
    at d.setup (route.js:444:1)
    at o (router_js.js:1544:1)
    at s.routeEnteredOrUpdated (router_js.js:1554:1)
    at s.setupContexts (router_js.js:1500:1)
    at s.finalizeTransition (router_js.js:1408:1)
    at router_js.js:1347:1
    at _ (rsvp.js:434:1)
    at y (rsvp.js:420:1)
    at invoke (backburner.js.js:282:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at backburner.js.js:523:1
error @ application.js:155
router.js:1141 Error while processing route: topic.fromParamsNear r.subscribe is not a function

```

 ![一张堆栈跟踪显示带有黑色背景的系统错误。(由 AI 标注)](https://global.discourse-cdn.com/meta/original/4X/7/8/1/781f264aadf3b92365740224ce193adf45dcbe35.jpeg)

结果是一系列 js 错误。当我转到某个特定主题时，它只显示错误，一个“出了点问题”的屏幕。

有什么故障排除的建议吗？提前感谢。

---

_[View the full topic](https://meta.discourse.org/t/typeerror-cannot-set-property-deletetopic-of-object-object-which-has-only-a-getter/345063)._
