Skip to content

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

@heilmela

Description

@heilmela

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";

Metadata

Metadata

Assignees

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