Skip to content

No shell available. Mount a WasmVM runtime to enable exec() #64

@ishaksebsib

Description

@ishaksebsib

when running the example in the README

import { createKernel, createInMemoryFileSystem, createNodeRuntime } from "secure-exec";

const kernel = createKernel({
  filesystem: createInMemoryFileSystem(),
});
await kernel.mount(createNodeRuntime());

const result = await kernel.exec("node -e \"console.log('hello from secure-exec')\"");
console.log(result.stdout); // "hello from secure-exec\n"

await kernel.dispose();

I get:

236 |         // Flush pending /bin stubs before shell PATH lookup
237 |         await this.flushPendingBinEntries();
238 |         // Route through shell
239 |         const shell = this.commandRegistry.resolve("sh");
240 |         if (!shell) {
241 |             throw new Error("No shell available. Mount a WasmVM runtime to enable exec().");
                            ^
error: No shell available. Mount a WasmVM runtime to enable exec().

Metadata

Metadata

Assignees

No one assigned

    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