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

regeneratorRuntime is not defined (after installing 3.4) #351

Closed
garth opened this issue Apr 6, 2021 · 10 comments · Fixed by #352
Closed

regeneratorRuntime is not defined (after installing 3.4) #351

garth opened this issue Apr 6, 2021 · 10 comments · Fixed by #352

Comments

@garth
Copy link

garth commented Apr 6, 2021

ReferenceError: regeneratorRuntime is not defined
    at create ([...]/node_modules/zustand/index.js:156:31)

Reverting back to 3.3.3 fixes the issue.

@garth garth changed the title regeneratorRuntime is not defined (after installiing 3.4) regeneratorRuntime is not defined (after installing 3.4) Apr 6, 2021
@aulneau
Copy link
Contributor

aulneau commented Apr 6, 2021

@dai-shi might be that regenerator-runtime needs to be a peer dep.

@garth can you try to install regenerator-runtime and see if that fixes it? Also, there are breaking changes, have you looked at https://github.com/pmndrs/zustand/releases/tag/v3.4.0 ?

@SimeonGriggs
Copy link

Oh boy it's not just me! What a relief 😅

Confirmed going back to 3.3.3 fixes.

@garth
Copy link
Author

garth commented Apr 6, 2021

Adding regenerator-runtime as a dependency doesn't seem to make any difference.

I did check the release notes, but it's not clear to me what the implications are.

@worstpractice
Copy link

Related: #336 (comment)

@dai-shi
Copy link
Member

dai-shi commented Apr 7, 2021

Sorry, guys. I'll investigate it later. Meanwhile, please keep using v3.3.3.
This is just unexpected for me, thus not noted in the release note.

@gersomvg
Copy link

gersomvg commented Apr 7, 2021

Ai this broke our builds as well. Didn't realise that if you do a fresh install with "zustand": "^3.1.3" it will install the latest minor version (not the latest patch). Removing the ^ for now..

Maybe this should've been a major version update?

@dai-shi
Copy link
Member

dai-shi commented Apr 7, 2021

@gersomvg would you please test if #352 fixes it?
This breaking is not intended. My apologies.
Note ^ does update minor, ~ does for patch.

@prarabdhb
Copy link

I tested #352 and the build succeeded. It was failing with 3.4.0 but its working now.

@dai-shi
Copy link
Member

dai-shi commented Apr 8, 2021

https://www.npmjs.com/package/zustand/v/3.4.1

Thanks everyone for reporting and testing.

@gersomvg
Copy link

gersomvg commented Apr 8, 2021

@dai-shi No worries, thanks for fixing it so quick! 🙏🏻 This helped me get a better grasp of how NPM install/update works with respect to semver, so for me it served a purpose 😬

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

Successfully merging a pull request may close this issue.

7 participants