Could not resolve dependencies when importing {loadDecompressHandlers } from "@mcap/support" #1182
Unanswered
victorgtrrz
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to build a web application capable of reading a .mcap file and displaying the data for a project in college For that reason I'm trying to use the MCAP TypeScript SDK, where I found the following snippet, designed to read MCAP files in a browser:
import { loadDecompressHandlers } from "@mcap/support";
import { BlobReadable } from "@mcap/browser";
import { McapIndexedReader } from "@mcap/core";
import { open } from "fs/promises";
async function onInputOrDrop(event: InputEvent | DragEvent) {
const file = event.dataTransfer.files[0];
const decompressHandlers = await loadDecompressHandlers();
const reader = await McapIndexedReader.Initialize({
readable: new BlobReadable(file),
decompressHandlers,
});
}
For some reason, trying to import loadDecompressHandlers launches the following errors:
Could not resolve "a"
Could not resolve "env"
Could not resolve "wasi_snapshot_preview1"
This require call is not allowed because the imported file "@foxglove/wasm-zstd/dist/wasm-zstd.wasm" contains a top-level await
This require call is not allowed because the imported file "@foxglove/wasm-lz4/dist/wasm-lz4.wasm" contains a top-level await
This require call is not allowed because the imported file "@foxglove/wasm-bz2/wasm/module.wasm" contains a top-level await
What am I missing? Any help is welcome.
Beta Was this translation helpful? Give feedback.
All reactions