pmndrs / zustand

🐻 Bear necessities for state management in React

Home Page:https://zustand-demo.pmnd.rs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Can't resolve 'react' in '[...]/node_modules/zustand/esm'

bkimminich opened this issue · comments

Summary

Since 4.4.2 I am getting unexpected build failures in an application that has zustand only as a subdependency:

./node_modules/zustand/esm/shallow.mjs:1:0-31 - Error: Module not found: Error: Can't resolve 'react' in '/home/runner/work/juice-shop/juice-shop/frontend/node_modules/zustand/esm'

Link to reproduction

As I am not using zustand directly, I unfortunately can't deliver one. But adding zustand to my direct dependencies as "zustand": "4.4.1" solves the build issue.

Let's merge the discussion into #2095.