# Error when using compat package

**URL:** <https://discourse.aurelia.io/t/error-when-using-compat-package/5151>\
**Category:** vNext\
**Created:** [April 18, 2023, 7:51am UTC](https://discourse.aurelia.io/t/error-when-using-compat-package/5151 "2023-04-18T07:51:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elitastic](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitastic/32/1787_2.png) [@elitastic](https://discourse.aurelia.io/u/elitastic)\
**Post date:** [April 18, 2023, 7:51am UTC](https://discourse.aurelia.io/t/error-when-using-compat-package/5151/1 "2023-04-18T07:51:09Z")

</div>

When I try to register the @aurelia/compat-v1 package, I get the following error:

```auto
Uncaught TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
    at Function.defineProperty (<anonymous>)
    at entry.bundle.js:4466:16
    at Array.forEach (<anonymous>)
    at defineBindingMethods (entry.bundle.js:4465:7)
    at Object.register (entry.bundle.js:4610:9)
    at Container.register (entry.bundle.js:5510:25)
    at Aurelia.register (entry.bundle.js:23360:24)
    at Aurelia.register (entry.bundle.js:28617:30)
    at ./src/main.ts (entry.bundle.js:1013:49)
    at __webpack_require__ (entry.bundle.js:28666:33)

```

Repro: [compat package - StackBlitz](https://stackblitz.com/edit/au2-conventions-vk9pey?file=src/main.ts)

Am I doing something wrong? Many thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [April 18, 2023, 8:51am UTC](https://discourse.aurelia.io/t/error-when-using-compat-package/5151/2 "2023-04-18T08:51:15Z")

</div>

It’s a bug in the compat package, somehow was not detected. The issue boils down to this

```ts
Object.defineProperty(obj, key, {
  writable: true,
  get() { }
})

```

If there’ both `writable` and `get` on the property descriptor (3rd param), then it💥

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [April 18, 2023, 10:52am UTC](https://discourse.aurelia.io/t/error-when-using-compat-package/5151/3 "2023-04-18T10:52:16Z")

</div>

A new dev version with the fix for this issue is out, maybe you can try that and see if it fixes your issue?

---

<div class="post-metadata">

**Author:** ![elitastic](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitastic/32/1787_2.png) [@elitastic](https://discourse.aurelia.io/u/elitastic)\
**Post date:** [April 18, 2023, 11:16am UTC](https://discourse.aurelia.io/t/error-when-using-compat-package/5151/4 "2023-04-18T11:16:54Z")

</div>

It is working now, thank you very much!
