create-keystone-app icon indicating copy to clipboard operation
create-keystone-app copied to clipboard

Create keystone-app resulting with error

Open dajvido opened this issue 2 years ago • 2 comments

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 [email protected], when locking the dependency to [email protected] the issue does not occur.

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

Running using:

  • Chrome browser (version 112)
  • Node 18.12.1
  • npm 8.19.2
  • yarn 1.22.19

dajvido avatar May 04 '23 22:05 dajvido

i fixed the issue by running npm i [email protected] as said in

cvanh avatar May 10 '23 19:05 cvanh

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.

MohammadKurjieh avatar May 12 '23 23:05 MohammadKurjieh