thx / resvg-js

A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs.
https://resvg-js.vercel.app/
Mozilla Public License 2.0
1.57k stars 57 forks source link

Deno 2.0 and denoland Help to configure architecture #357

Open emotilla opened 1 month ago

emotilla commented 1 month ago

"npm@resvg/resvg-js" does not resolve to the correct architecture in denoland (dash.deno.com).

This is the log from denoland:

Packaging complete The deployment failed: UNCAUGHT_EXCEPTION Error: Cannot find module '@resvg/resvg-js-linux-x64-gnu' Require stack: - /node_modules/.deno/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/js-binding.js - /node_modules/.deno/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/index.js - /node_modules/.deno/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/index.js at Function.Module._resolveFilename (node:module:608:15) at Function.Module._load (node:module:486:27) at Module.require (node:module:674:19) at require (node:module:801:16) at Object. (file:///node_modules/.deno/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/js-binding.js:1:3733) at Object. (file:///node_modules/.deno/@resvg+resvg-js@2.6.2/node_modules/@resvg/resvg-js/js-binding.js:3:4) at Module._compile (node:module:736:34) at Object.Module._extensions..js (node:module:757:11) at Module.load (node:module:655:32) at Function.Module._load (node:module:523:13) .....

yisibl commented 1 month ago

This may require a trip to deno to file an issue, as deno 1.x works fine.

emotilla commented 4 weeks ago

Thanks Yasibil, here the same with deno upgrade to 2.03:

$> Task wh deno serve -A --env -r --unstable-kv --watch webhook.ts Watcher Process started. error: Uncaught (in promise) Error: Unsupported OS: undefined, architecture: undefined at Object. (file:///Users/enrique/Library/Caches/deno/npm/registry.npmjs.org/@resvg/resvg-js/2.6.2/js-binding.js:1:5411) at Object. (file:///Users/enrique/Library/Caches/deno/npm/registry.npmjs.org/@resvg/resvg-js/2.6.2/js-binding.js:3:4) at Module._compile (node:module:748:34) at Object.Module._extensions..js (node:module:767:10) at Module.load (node:module:665:32) at Function.Module._load (node:module:537:12) at Module.require (node:module:684:19) at require (node:module:808:16) at Object. (file:///Users/enrique/Library/Caches/deno/npm/registry.npmjs.org/@resvg/resvg-js/2.6.2/index.js:1:307) at Object. (file:///Users/enrique/Library/Caches/deno/npm/registry.npmjs.org/@resvg/resvg-js/2.6.2/index.js:25:4)

--- maybe is just on how to configure the architecture and OS. I really like this library hope we can make it work. Kindest regards!...