Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HtmlComponent to modules map #5

Open
jonasgaiswinkler-oebb opened this issue Aug 12, 2024 · 0 comments
Open

Add HtmlComponent to modules map #5

jonasgaiswinkler-oebb opened this issue Aug 12, 2024 · 0 comments

Comments

@jonasgaiswinkler-oebb
Copy link

Hi,

I am currently developing a custom widget settings component using the thingsboard-extensions repo and I have been using the tb-js-func Component without any issues. Now I also wanted to use the tb-html Component, which result in an error:

WARNING: "@shared/components/html.component" is imported by "dist/widget-extension/esm2020/widgets/components/oebb-file-preview/settings/oebb-file-preview-settings.component.mjs", but could not be resolved – treating it as an external dependency.

vendor.9afe100a7a6af88f.js:1 ERROR Error: Uncaught (in promise): Error: Error loading @shared/components/html.component from http://localhost:5000/static/widgets/thingsboard-extension-widgets.js (SystemJS Error#3 https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3) Error: Error loading @shared/components/html.component from http://localhost:5000/static/widgets/thingsboard-extension-widgets.js (SystemJS Error#3 https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3) at HTMLScriptElement.<anonymous> (https://iot-neo.oebb.cloud/scripts.c88fecd373e21509.js:1:29090) at Y.invokeTask (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:7482) at Object.onInvokeTask (https://iot-neo.oebb.cloud/vendor.9afe100a7a6af88f.js:1:1021227) at Y.invokeTask (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:7403) at G.runTask (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:2824) at V.invokeTask [as invoke] (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:8569) at st (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:21316) at it (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:21645) at HTMLScriptElement.mt (https://iot-neo.oebb.cloud/polyfills.0fd75f5da99e1ecb.js:1:21931)

Is this because the HtmlComponent is not part of the node_modules\thingsboard\src\app\modules\common\modules-map.ts file? Would it be possible to add the HtmlComponent so that it can be used in Custom Widgets?

Best regards,
Jonas Gaiswinkler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant