as-wasi icon indicating copy to clipboard operation
as-wasi copied to clipboard

Compile Error: Cannot find name 'abort'.

Open Jonarod opened this issue 1 year ago • 0 comments

Just following the Quick Start:

// Import from the installed as-wasi package
import { Console, Environ } from "as-wasi/assembly";

// Create an environ instance
let env = new Environ();

// Get the HOME Environment variable
let home = env.get("HOME")!;

// Log the HOME string to stdout
Console.log(home);

Then building asc assembly/index.ts --target release throws compile error:

ERROR TS2304: Cannot find name 'abort'.
     :
 935 │ abort();
     │ ~~~~~
     └─ in ~lib/as-wasi/assembly/as-wasi.ts(935,7)

ERROR TS2304: Cannot find name 'abort'.
     :
 944 │ abort();
     │ ~~~~~
     └─ in ~lib/as-wasi/assembly/as-wasi.ts(944,7)

FAILURE 2 compile error(s)

This error disappears if I don't useEnviron but only Console for example.

Maybe related to #127

Jonarod avatar Mar 22 '23 01:03 Jonarod