Skip to content

Issues when importing some functions from NcRichText.js #3864

Closed as not planned
@julien-nc

Description

When importing registerWidget, registerCustomPickerElement or NcCustomPickerRenderResult from @nextcloud/vue/dist/Components/NcRichText.js the script fails and we get Uncaught TypeError: inspect is undefined in the browser console:

image

But this error goes away as soon as we import something from @nextcloud/vue-richtext, even an empty import like import {} from '@nextcloud/vue-richtext'.

This issue cannot be reproduced when linking with @nextcloud/vue (same with master or v7.8.0, it works fine).

So it seems there are some missing dependencies in the @nextcloud/vue package. Or can it be related with node-polyfill? I'm lost there.

To reproduce this bug, one can use this integration_tmdb branch: https://github.com/julien-nc/integration_tmdb/tree/enh/noid/replace-vue-richtext-by-vue , compile and enable the app in NC 26 or master and browse Talk or the Files app (with Text enabled).
The problematic import is in https://github.com/julien-nc/integration_tmdb/blob/enh/noid/replace-vue-richtext-by-vue/src/reference.js#L23-L24

cc @raimund-schluessler @juliushaertl

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeature: richtextRelated to the richtext component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions