I'm starting with payload and everything works but now suddenly I'm getting this weird React Hooks error. 😦
I've attached my config files over here:
https://gist.github.com/kobeaerts/cd40e51224f9821b3ea06c3858f39a65Any ideas?
What build tool are you using? If it's yarn, can you run
yarn why react
?
C▲ Sites/dcide-payload yarn why react
yarn why v1.22.15
[1/4] 🤔 Why do we have the module "react"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "react@18.2.0"
info Reasons this module exists
- "payload" depends on it
- Hoisted from "payload#react"
info Disk size without dependencies: "320KB"
info Disk size with unique dependencies: "352KB"
info Disk size with transitive dependencies: "380KB"
info Number of shared dependencies: 2
✨ Done in 0.67s.
▲ Sites/dcide-payload
`
Ok, I deleted all my lock files and ran a new fresh install, that fixed it 😐
It didn't for me, using
npm
Well fuck me, it's back 😄
i have same error after install @aws-sdk/client-s3 and @aws-sdk/lib-storage
but i cannot solve 😒
i ve summoned a new payload app in a different dir and it seems to work now
so i guess it's not about react after all (sorry)
as soon as I do
npm i
or
npm update
bahbye
so as soon as any installation process apart from the scaffolding
create-payload-app
is involved it stops working
ok I was able to mitigate this issue after installing latest
react
and
react-dom
as dev dependencies
Adding this to my package.json has fixed this error.
"overrides": {
"react": "18.2.0"
}
We have some changes in a canary release that should address the react dependencies problems.
You can wait for the release (probably tomorrow) or if you want to try the canary, pin your version in package.json to dependency
"payload": "1.8.3-canary.1"
The changes make it so you don't need
overrides
or
resolutions
or
--legacy-peer-deps`
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.