Skip to content

Commit

Permalink
fix(media): remove type import fs/crypto (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassiebp authored Nov 21, 2024
1 parent 306099d commit 442badd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions langfuse-core/src/media/LangfuseMedia.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
let fs: typeof import("fs") | undefined;
let crypto: typeof import("crypto") | undefined;
let fs: any;
let crypto: any;

// Fail gracefully in environments without fs/crypto support
try {
fs = require("fs");
crypto = require("crypto");
} catch {
// Fail gracefully in environments without fs/crypto support
fs = undefined;
crypto = undefined;
}

try {
Expand Down

0 comments on commit 442badd

Please sign in to comment.