# Using Svelte editor components from Anki - what causes "TypeError: ctx\[3\] is not a constructor"?

**URL:** <https://forums.ankiweb.net/t/using-svelte-editor-components-from-anki-what-causes-typeerror-ctx-3-is-not-a-constructor/12387>\
**Category:** Development\
**Created:** [August 17, 2021, 6:14am UTC](https://forums.ankiweb.net/t/using-svelte-editor-components-from-anki-what-causes-typeerror-ctx-3-is-not-a-constructor/12387 "2021-08-17T06:14:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 25, 2021, 2:12am UTC](https://forums.ankiweb.net/t/using-svelte-editor-components-from-anki-what-causes-typeerror-ctx-3-is-not-a-constructor/12387/5 "2021-08-25T02:12:39Z")

</div>

I believe the error you were getting should be resolved in 2.1.47rc2, and the exported components should work correctly now, though not everything has been exported yet. To ensure the components work correctly, you’ll need to make sure you mark Svelte as external when bundling: [anki\_new\_format\_pack/build.js at no-parents · ankitects/anki\_new\_format\_pack · GitHub](https://github.com/ankitects/anki_new_format_pack/blob/no-parents/web/build.js)

The comments about this being alpha still apply, as things may still need to be moved around/refactored as we get more experience with Svelte. The components global will likely be renamed to something like anki.components at one point for example.

---

_[View the full topic](https://forums.ankiweb.net/t/using-svelte-editor-components-from-anki-what-causes-typeerror-ctx-3-is-not-a-constructor/12387)._
