Closed digital-h closed 3 years ago
Thank you for the reference to this article @digital-h - we will release a new version that is published as both commonjs and modules to resolve the issue. We'll update this ticket once we have done this!
This was resolved by the move to featurehub-javascript-client-sdk.
Describe the bug I'm following the examples to include the TypeScript-SDK at https://github.com/featurehub-io/featurehub/tree/master/sdks/typescript/client-typescript-eventsource
I do not have any node.js running, but would like to use it with my lit-element / web-component frontend.
"featurehub-eventsource-sdk": "^1.2.1" "typescript": "4.1.3" "es-dev-server": "1.60.2" "lit-element": "2.4.0"
When opening the html-page, I get the following error:
Uncaught SyntaxError: The requested module '../../../featurehub-repository/dist/index.js' does not provide an export named 'featureHubRepository'
Which area does this issue belong to?
To Reproduce Steps to reproduce the behavior:
Expected behavior No error-message, but a functional SDK
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
You can get the version of the FeatureHub container by running
docker ps
command. Please include the OS and what version of the OS and Docker you're running.featurehub/party-server:latest
Additional context An ESM wrapper for your CJS named exports might already be a solution to my problem. https://blog.logrocket.com/publishing-node-modules-typescript-es-modules/
Working with https://github.com/postui/esm.sh seems to work