Skip to content

Report a wasm error for the deno envirnoment #1077

@fwqaaq

Description

@fwqaaq

The lighningCss can't run for the deno. The error shows:

My deno version:

deno --version                                                                                                         
deno 2.5.4 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2

I just ran test code:

import init, { transform } from 'https://esm.run/lightningcss-wasm';

await init();

let {code, map} = transform({
  filename: 'style.css',
  code: new TextEncoder().encode('.foo { color: red }'),
  minify: true,
});

console.log(new TextDecoder().decode(code));
error: Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #21 "env" "__getrandom_v03_custom": function import requires a callable
    at ext:deno_fetch/26_fetch.js:594:20
    at eventLoopTick (ext:core/01_core.js:179:7)

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