Skip to content

Error loading custom JS module in widget – "Unable to parse module" #95

@BigNavid

Description

@BigNavid

Hello,

I cloned the release-4.0 branch of this repository and successfully built the JavaScript file. After uploading the generated .js file as a resource in ThingsBoard, I attempted to use it within a custom widget.

However, I encountered the following error when trying to load the widget:

Widget wasn't loaded due to the following errors:
Unable to parse module from URL: /api/resource/js_module/tenant/thingsboard-extension-widgets.js

I also tested this using the latest master branch, and the same error occurred.

I'm currently using ThingsBoard Community Edition, version 4.1.0.

I've attached the built JS file, renamed to .txt for GitHub compatibility.

👉 Please rename thingsboard-extension-widgets.txt back to .js before testing.

thingsboard-extension-widgets.txt

Any guidance or suggestions would be appreciated.
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions