What is your question:
react upgrade to the ^19.1.0 version, drei upgrade to ^10.0.6 version, after start-up error, error from /node_modules/tunnel-rat/node_modules/react/cjs/react.development.js, The error message is Warning" : Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons.
I checked the node_modules in my project and found that the tunnel-rat that drei depends on is ^0.1.2, and the dependencies zustand is ^4.3.2. This version of zustand relies on use-sync-external-store 1.2.2, and use-sync-external-store peerDependencies react ^18. This causes tunnel-rat to generate node_modules, which rely on version ^18 of react, while react-dom uses ^19 in the project.
├─┬ @react-three/drei@10.0.6
│ ├─┬ @use-gesture/react@10.3.1
│ │ └── react@19.1.0 deduped
│ ├── react@19.1.0 deduped
│ ├─┬ tunnel-rat@0.1.2 overridden
│ │ └─┬ zustand@4.5.5 overridden
│ │ ├── react@18.3.1
│ │ └─┬ use-sync-external-store@1.2.2 overridden
│ │ └── react@18.3.1 deduped
│ └─┬ use-sync-external-store@1.5.0
│ └── react@19.1.0 deduped
Has anyone encountered this problem during the upgrade?
What is your question:
react upgrade to the ^19.1.0 version, drei upgrade to ^10.0.6 version, after start-up error, error from
/node_modules/tunnel-rat/node_modules/react/cjs/react.development.js, The error message isWarning" : Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons.I checked the node_modules in my project and found that the tunnel-rat that drei depends on is ^0.1.2, and the dependencies zustand is ^4.3.2. This version of zustand relies on use-sync-external-store 1.2.2, and use-sync-external-store peerDependencies react ^18. This causes tunnel-rat to generate node_modules, which rely on version ^18 of react, while react-dom uses ^19 in the project.
├─┬ @react-three/drei@10.0.6
│ ├─┬ @use-gesture/react@10.3.1
│ │ └── react@19.1.0 deduped
│ ├── react@19.1.0 deduped
│ ├─┬ tunnel-rat@0.1.2 overridden
│ │ └─┬ zustand@4.5.5 overridden
│ │ ├── react@18.3.1
│ │ └─┬ use-sync-external-store@1.2.2 overridden
│ │ └── react@18.3.1 deduped
│ └─┬ use-sync-external-store@1.5.0
│ └── react@19.1.0 deduped
Has anyone encountered this problem during the upgrade?