TypeError: template is not a function

Hey everyone,

I am trying to update my Ember addon and get this error, but I have no clue how to fix it. Does anyone know where I should start debugging it?

TypeError: template is not a function
    Ember 32
    js chunk.vendors-node_modules_editorjs_delimiter_dist_delimiter_umd_js-node_modules_editorjs_embed_dis-80ef7a.1bb1942cb55ee8998560.js:3285
    __webpack_require__ chunk.tests.d9e91cc15a1321451a62.js:505
    <anonymous> Ember
    js chunk.vendors-node_modules_editorjs_delimiter_dist_delimiter_umd_js-node_modules_editorjs_embed_dis-80ef7a.1bb1942cb55ee8998560.js:2507
    __webpack_require__ chunk.tests.d9e91cc15a1321451a62.js:505
    <anonymous> Ember
    js chunk.vendors-node_modules_editorjs_delimiter_dist_delimiter_umd_js-node_modules_editorjs_embed_dis-80ef7a.1bb1942cb55ee8998560.js:2496
    __webpack_require__ chunk.tests.d9e91cc15a1321451a62.js:505
    <anonymous> Ember
    exports loader.js:106
    _reify loader.js:143
    reify loader.js:130
    exports loader.js:104
    requireModule loader.js:27
    r loader.js:176
    Ember 3
    <anonymous> app.js:24
    exports loader.js:106
    _reify loader.js:143
    reify loader.js:130
    exports loader.js:104
    requireModule loader.js:27
    <anonymous> Ember

Could you share some more details about your upgrade? And what libs/addons you are using?

From the stack trace it looks like it’s from editor.js but that’s just a guess. Are you using that directly? Or with an Ember addon?

I am upgrading one of my addons from v1 to v2. Editor.js from the stack is this library: https://editorjs.io/, which works fine with v1.

So far, I have found that I get this error because I want to re-export the compiled templates from the “/templates” folder. If I just move those templates from the add-on to the app, the error goes away. Is there a good way to re-export the route templates from a v2 add-on?