wesbos / advanced-react-rerecord

Trying things out. Feel free to follow along
247 stars 36 forks source link

Unhandled Runtime Error Error: useKeystone must be called inside a KeystoneProvider component #93

Closed toticavalcanti closed 3 years ago

toticavalcanti commented 3 years ago

Hi wes, I try run your code, but when I try to access one particular user, or products, or roles, etc. Or try add some product... in the admin cmd, I receive this message: useKeystone must be called inside a KeystoneProvider component. How fix this issue? I can list all the users, products, etc without problem. Thank you \o/

Asjas commented 3 years ago

Hi, Are you using the code from the advanced-react-rerecord repo or the advanced-react repo? 🙂

toticavalcanti commented 3 years ago

I tried both :), but the error in advanced-react is another: � There was an error initialising Keystone Error: Expected a Boolean, Object, or Function for User.access.read, but got undefined Expected a Boolean, Object, or Function for User.access.update, but got undefined

This error occurs with all schemas.

toticavalcanti commented 3 years ago

I run yarn again in advanced-react, and all works fine. thank you :)