Closed spence closed 11 months ago
It is strange to me that esm.sh prefers the "node" export over the "default" export. I think I fixed this by explicitly providing a "browser" bundle.
Maybe you should look into jsdelivr or esm.run, as they don't have this weird behavior (they also use rollup, the bundler that I would recommend).
Tip: next time please just describe the steps for reproduction (I usually don't clone foreign repositories).
Thanks!
@spence How did you solve it? How does this work in Typescript/NextJS without esm.run? This only happens in Next ^13.5.0, so maybe something broke on their end on how they import modules
./node_modules/lib0/random.js
Attempted import error: 'getRandomValues' is not exported from 'lib0/webcrypto' (imported as 'getRandomValues').
@leolorenzoluis This should work now in the latest release of Yjs (>=13.6.8)
@dmonad Same issue with latest next version (13.5.4) and yjs (13.6.8)
Server Error
ModuleDependencyError: export 'getRandomValues' (imported as 'getRandomValues') was not found in 'lib0/webcrypto' (possible exports: default)
I think you are talking about a different issue. Please open a new ticket with steps for reproduction
Describe the bug
lib0/webcrypto
has been broken for browser contexts sincelib@0.2.73
due to remapping exports (2617ed3).To Reproduce
Expected Behavior
Via pinning
lib0/webcrypto@0.2.73
:Actual Behavior
Without pinning:
Environment Information
Additional context
You can see the published source of each version via source maps.
0.2.72
(works)0.2.73
(broken)Related: