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
@xli can you provide more information or investigate why swagger-js cannot be used with deno? I'm willing to collaborate with you on this, but need more info.
There are some dependencies are not on deno if you tried to import from npm.
For example, after launch deno console, execute: import client from "https://dev.jspm.io/swagger-client";
> import client from "https://dev.jspm.io/swagger-client";
Download https://dev.jspm.io/npm:cross-fetch@3/polyfill?dew
Uncaught TypeError: Import 'https://dev.jspm.io/npm:cross-fetch@3/polyfill?dew' failed, not found.
at https://dev.jspm.io/npm:swagger-client@3.17.0/lib/http/index.dew.js:1:40
at async <anonymous>:2:30
I think a better support is deploy swagger-js to deno (it supports deploy from github repo), and probably need figure out solution for dependencies that are not on deno.
As long as deno supports CommonJS it should be able to process this import. The only thing that might prevent this is that we build this bundle against window object. If you download this file locally and replace window on line 10 with globalThis things should work. Please let me know if it works, and if yes, we'll release next version of the bundle to unpkg with globalThis object and it should allow you to use swagger-client in deno.
Can't import swagger client in deno (https://deno.com) from current npm publish.
Any chance to get swagger-js deploy to deno?
The text was updated successfully, but these errors were encountered: