You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the await Vips() snippet form the README on Deno results in the following:
Deno 1.32.1
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> import Vips from 'https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js';
undefined
> const vips = await Vips();
error: Uncaught (in worker "") TypeError: na is not a function
at https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js:116:217
at new Promise (<anonymous>)
at e (https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js:116:191)
at f (https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js:116:467)
at dd (https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js:117:361)
at https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js:118:327
The text was updated successfully, but these errors were encountered:
This is due to missing dynamic modules support on Deno, which was fixed with commit 997031a.
You can workaround this by disabling support for this (which implies that support for JPEG XL images is also disabled). For example:
importVipsfrom'https://cdn.jsdelivr.net/npm/wasm-vips/lib/vips-es6.js';constvips=awaitVips({dynamicLibraries: []});// Load a formatted image from bufferconstbuffer=awaitDeno.readFile('playground/src/images/banana.webp');constthumbnail=vips.Image.thumbnailBuffer(buffer,500,{option_string: '[n=-1]',height: 500});// Write the result to a blobconstoutBuffer=thumbnail.writeToBuffer('.gif');awaitDeno.writeFile('banana.gif',outBuffer);// Exit the Deno runtime (i.e. a more "commandline" experience)Deno.exit();
$ deno run --allow-net --allow-read --allow-write test.js
Running the await Vips() snippet form the README on Deno results in the following:
The text was updated successfully, but these errors were encountered: