web3-storage / web3.storage

DEPRECATED ⁂ The simple file storage service for IPFS & Filecoin
https://web3.storage
Other
501 stars 121 forks source link

web3.storage does not skypack #220

Open olizilla opened 3 years ago

olizilla commented 3 years ago

Trying to import web3.storage from skypack like so:

<script type="module">
import { Web3Storage } from 'https://cdn.skypack.dev/web3.storage'
</script>

fails with:

Uncaught TypeError: null has no properties
    <anonymous> https://cdn.skypack.dev/-/uint8arrays@v2.1.8-V4yKmFZA5flfvKIy9mKK/dist=es2020,mode=imports/unoptimized/util/bases.js:2
bases.js:2:17

see: https://codepen.io/olizilla/pen/wvdmJXK

vasco-santos commented 3 years ago

yeah, this is hopefully fixed by:

vasco-santos commented 3 years ago

This is currently blocked on figuring out a solution for CI tests with Electron on an ESM project (Electron does not support ESM). We can compile ESM tests to CJS and use them for tests in Electron, which would be great but does not work with a monorepo, where one package depends on the other. Given we ship the content of dist (generated by ipjs with exports for cjs/esm), but in the monorepo tests, we will not import the dist content.

dchoi27 commented 2 years ago

Let's check up on this (see if any movement) and make a call if we should just close this given that we have a solution for users and Skypack is no longer in active development. cc @alanshaw

alanshaw commented 2 years ago

It's currently failing with:

Uncaught TypeError: null has no properties
    <anonymous> https://cdn.skypack.dev/-/hamt-sharding@v2.0.1-2WfbeukgfNYgnLr54HmK/dist=es2019,mode=imports/optimized/hamt-sharding.js:4

There's some changes I made to hamt-sharding that need to be released. I would like to at least wait for that to happen before we close this.

vasco-santos commented 2 years ago

Update on current known errors

image

From previous experience, once one issue is addressed, next pops in, so there is no clear indication on how many will exist

sonika-25 commented 2 years ago

Did you solve this? I am also getting 'cannot destructure' error.