joebobmiles / zustand-middleware-yjs

Zustand middleware that enables sharing of state between clients via Yjs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Array' is not exported from 'yjs' (imported as 'Y').

dymat opened this issue · comments

Hi there,

I am getting the following error when executing the example code from the Readme.md. My setup is quite simple:

In a node:14 docker container

$ npx create-react-app testapp
$ cd testapp
$ yarn add zustand zustand-middleware-yjs yjs
$ yarn start

( I just copy&pasted the example code to the src/index.js before yarn start)

Failed to compile.

./node_modules/zustand-middleware-yjs/dist/yjs.mjs
Attempted import error: 'Array' is not exported from 'yjs' (imported as 'Y').

Can you help me with a hint whats going wrong?

Well, shit, I totally missed this issue. Sorry for taking so long.

Best guess is an API change in yjs? I'm not sure. I'll take a look at this as I also look into #32.

Hey, I can't reproduce this bug locally. Can you share a repository that produces this bug?

Also, which example did you use? The counter app from the examples folder? Or the example code from the README?

Hi Joe,

I took the code from the README. But now when I try to reproduce, it is just working fine. It seemed to be a fault on my side.
Thanks anyway!

Best regards,
D