skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

Problem building "bcrypto" for es2020 #158

Open DougAnderson444 opened 3 years ago

DougAnderson444 commented 3 years ago

What I am trying to do

import { default as IPFS } from "https://cdn.skypack.dev/ipfs-core";

Easily reproduce the error:

  1. https://replit.com/@DougAnderson444/Bcrypto-error

  2. scroll to the bottom here: https://cdn.skypack.dev/-/bcrypto@v5.4.0-nZcwfIyNDDjI6m158fpT/dist=es2020,mode=imports/unoptimized/lib/js/precomputed/ed25519.json

What's happening?

This warning is added to the bottom of the build, throwing off the whole process:

      [
        "53b3f967bff8760948dec5e9282f35d1434a5503790b9012e17faefbe7c4d699",
        "404462283c8664a17daa5b4059dcd10e2699fd86d0140de9f3e8ad0566098ae5"
      ]
    ]
  }
}
console.warn('There was a problem building "bcrypto" for es2020');  // <----------- Throwing off the whole Deno build

Steps to Fix

Remove the warning log?

5310 commented 3 years ago

This error is no longer triggered as of ipfs-core@0.10.3.

--

It still fails to import, unfortunately. Just not due to any appended warning message. It now fails to import a file from within a rather simple NPM module that by itself imports just fine.

Just in case, this is a Repl.it reproduction: https://replit.com/@Scio/GlisteningFlippantCodegeneration

It fails to import with: error: Relative import path ".." not prefixed with / or ./ or ../ from "https://cdn.skypack.dev/-/it-pair@v1.0.0-zUdMATw45Oa0C4eIumJj/dist=es2020,mode=imports/unoptimized/duplex.js"

I'm still trying to figure out why this file fails to be imported, and will open another issue.