esm-dev / esm.sh

The no-build CDN for modern web development.
https://esm.sh
MIT License
3.15k stars 151 forks source link

Failed to import - @sendgrid/mail@7.7.0 #605

Open FranckPoingt opened 1 year ago

FranckPoingt commented 1 year ago

Failing module

import sgMail from "https://esm.sh/@sendgrid/mail@7.7.0";

Error message

After running supabase functions deploy myFn I got this:

Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: Relative import path "https" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v117/@types/node@18.15.13/https.d.ts"
      const ret = new Error(getStringFromWasm0(arg0, arg1));
                  ^
    at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
    at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
    at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)

Additional info

ije commented 1 year ago
Screenshot 2023-04-23 at 19 37 18

seems it works locally, maybe it's a bug of deno deploy.

FranckPoingt commented 1 year ago

@ije I gave up on using the package and went for wretch and a simple post to the API endpoint.

Thanks for testing it