keystonejs / create-keystone-app

CLI app that makes it easy to get started with Keystone
https://keystonejs.com/tutorials/getting-started-with-create-keystone-next-app
MIT License
38 stars 10 forks source link

Create keystone-app resulting with error #414

Open dajvido opened 1 year ago

dajvido commented 1 year ago

Following documentation to create keystone-app using either npm or yarn creates non-runnable app (throwing an error on /init when trying to run for the first time). It seems to be a problem with the latest next@13.4.0, when locking the dependency to next@13.3.0 the issue does not occur.

The error seen in both browser & server logs is TypeError: Cannot read properties of null (reading 'useContext')

Running using:

cvanh commented 1 year ago

i fixed the issue by running npm i next@13.3.4 as said in

MohammadKurjieh commented 1 year ago

This issue should be resolved by: https://github.com/keystonejs/keystone/pull/8568

Once this is patched, creating a keystone project should start working without the need to pin the next version.

For now, a temporary fix would be what @cvanh suggested. Pinning the next version in the package.json.