web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

web3.storage does not skypack

Open olizilla opened this issue 4 years ago • 6 comments

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/-/[email protected]/dist=es2020,mode=imports/unoptimized/util/bases.js:2
bases.js:2:17

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

olizilla avatar Jul 28 '21 19:07 olizilla

yeah, this is hopefully fixed by:

  • [x] https://github.com/mikeal/ipjs/pull/17
  • [x] https://github.com/ipfs/aegir/pull/865
  • [x] https://github.com/ipfs/aegir/pull/874
  • [x] https://github.com/achingbrain/uint8arrays/pull/22
  • [x] https://github.com/ipfs/js-ipfs-unixfs/pull/161
  • [x] https://github.com/ipfs/js-ipfs-utils/pull/137
  • [x] https://github.com/web3-storage/ipfs-car/pull/71
  • [x] https://github.com/ipfs/js-ipfs/pull/3774
  • [ ] https://github.com/web3-storage/ipfs-car/pull/79
  • [ ] https://github.com/multiformats/js-multiformats/issues/115

vasco-santos avatar Jul 28 '21 21:07 vasco-santos

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.

vasco-santos avatar Jul 30 '21 15:07 vasco-santos

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

dchoi27 avatar Feb 11 '22 15:02 dchoi27

It's currently failing with:

Uncaught TypeError: null has no properties
    <anonymous> https://cdn.skypack.dev/-/[email protected]/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.

alanshaw avatar Feb 21 '22 14:02 alanshaw

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

vasco-santos avatar Aug 15 '22 14:08 vasco-santos

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

sonika-25 avatar Aug 24 '22 13:08 sonika-25