Closed pradelkai closed 4 months ago
for me worked import Spaces from '@ably/spaces/dist/mjs'; instead of documentation import of Spaces
Hi @pradelkai and @MaksymZup, thank you for bringing this to our attention and providing the workaround. It appears to be a bug in the CommonJS version of the SDK. We are currently working on a fix for this. Right now, there are two workarounds:
import Spaces from '@ably/spaces/dist/mjs';
as @MaksymZup mentionedThis has been fixed in https://github.com/ably/spaces/pull/307 PR and will be released in the next patch version for Spaces SDK.
Hi @pradelkai , @MaksymZup !
This issue has been fixed in 0.3.1 Spaces SDK release.
Thank you. Much appreciated.
Kai
On Fri, May 3, 2024 at 8:20 AM Andrew Bulat @.***> wrote:
Hi @pradelkai https://github.com/pradelkai , @MaksymZup https://github.com/MaksymZup !
This issue has been fixed in 0.3.1 https://github.com/ably/spaces/releases/tag/0.3.1 Spaces SDK release.
— Reply to this email directly, view it on GitHub https://github.com/ably/spaces/issues/306#issuecomment-2092907099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYUOPHF75G5GHMLQDGPPHXDZAN6JBAVCNFSM6AAAAABEYGDLK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSHEYDOMBZHE . You are receiving this because you were mentioned.Message ID: @.***>
Just following the Hook install tutorial results in an ESM error: Error [ERR_REQUIRE_ESM]: require() of ES Module ...node_modules/@ably/spaces/node_modules/nanoid/index.js from ...node_modules/@ably/spaces/dist/cjs/SpaceUpdate.js not supported.
Any way to get around this?