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

(0 , import_digest.default) is not a function TypeError: (0 , import_digest.default) is not a function #381

Closed
heilmela opened this issue Jan 7, 2025 · 1 comment · Fixed by #382
Assignees

Comments

@heilmela
Copy link

heilmela commented Jan 7, 2025

It seems commonjs compatibility might still have some issues.
I tried using WebhookReceiver - which partially works.
When hitting the sha validation of the body i get:
(0 , import_digest.default) is not a function TypeError: (0 , import_digest.default) is not a function

Unfortunately, I did not find the time to inspect the cjs building stuff here throughly but maybe someone involved can spot the issue.
I had a quick look at the transpiled code and suspiciously only the digest has a __toESM() while other imports are untouched...

// in WebhookReceiver.cjs
// ... line 35
module.exports = __toCommonJS(WebhookReceiver_exports);
var import_protocol = require("@livekit/protocol");
var import_AccessToken = require("./AccessToken.cjs");
var import_digest = __toESM(require("./digest.cjs"), 1);
const authorizeHeader = "Authorize";
@lukasIO lukasIO mentioned this issue Jan 7, 2025
@lukasIO
Copy link
Contributor

lukasIO commented Jan 7, 2025

thanks for the report and thanks for the hint with the __toESM output

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

Successfully merging a pull request may close this issue.

2 participants