#Payload V3 , cant find import useField
14 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
Payload V3 , cant find import useField
I am having the same problem rn. Any updates?
Try this
import { useField } from "@payloadcms/ui";
You can read the updated documentation here (Change version to beta on the upper right part of the page)
https://payloadcms.com/docs/beta/admin/hooks#usefield
Thanks, but it seems to be some node_modules/dependencies problem itself. I've tried to reinstall node_modules and yet I still get an error of Module not found: Can't resolve ...
What version of the beta are you on?
Currently on beta.98, @trim halo/ui on beta.29(as it is the latest as far as i know). I've also tried adding the .nprmc with node-linker=hoisted and made sure that ui is under dependencies (not devDependencies). But nothing really works.
All your payload packages needs to be on the same version
Here's how it should look
You can use this tool https://www.npmjs.com/package/bump-payload
Either add it like that or you can probably do npx bump-payload and it will help you bump all the packages
If you choose to go to 109 there will probably be breaking changes though
I don't really know what made me think that it had different versions. When i installed payload i had to manually install they ui package. Changing it to the right version made it work. Thanks!