Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Vite -> Cannot read properties of undefined (reading '3') #8

Open
michael-wolfenden opened this issue Feb 2, 2023 · 1 comment

Comments

@michael-wolfenden
Copy link

Running the quickstart in a Vite project results in the following error:

> Please use proxy object
> Uncaught TypeError: Cannot read properties of undefined (reading '3')
    at subscribe (vanilla.mjs:218:23)
    at subscribeKey (utils.mjs:5:10)
    at main.tsx:9:1

Reproduction:
https://codesandbox.io/p/sandbox/cool-cloud-3pe3u2

Full screen preview (to see the errors in the console logs):
https://3pe3u2-5173.preview.csb.app/

I noticed a similar potentially related issue in the main valtio repo here:
pmndrs/valtio#299

@Noitidart
Copy link
Owner

Thanks for posting this and especially the link. So it looks like we need to upgrade valtio. The upgrade to valtio 1.9.x has come breaking changes in 1.7.x so it might take a little bit of work.

I have been meaning to overhaul this library but I haven't got to it. The rewrite would be this - #7 (comment)

I'm looking for help to help upgrade as I'm a bit busy right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants