keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Your GraphQL schema is not up to date

Open cheryl-c-tirerack opened this issue 6 months ago • 5 comments

https://github.com/keystonejs/keystone/issues/9304 Problem still exists. Steps clone repo @ said tag OR latest step into the examples/framework-nextjs-app-directory folder npm i --legacy-peer-deps

install fails with

postinstall keystone postinstall

expected install scripts to wrok

cheryl-c-tirerack avatar May 06 '25 21:05 cheryl-c-tirerack

The projects inside examples is not guaranteed that all of them have the schemas synchronized. You might need to do that manually until it will get fixed. PRs are welcome for that.

unrevised6419 avatar May 07 '25 07:05 unrevised6419

Hi @cheryl-c-tirerack,

Keystone is a pnpm monorepo, and using npm causes issues for various reasons. If you want to run examples from within the Keystone repo, you’ll need to use pnpm.

That said, you can copy any of the examples to a separate directory outside the repo, and then you can likely use npm or yarn there.

One thing to note: the current main branch includes breaking changes compared to the latest official release. It now uses Next.js 15, React 19, and a new Admin UI. If you're looking for the latest stable version (v6.5.1), you should check out the v6 branch.

marekryb avatar May 08 '25 03:05 marekryb

Hi- Thank you for the response. I tried two things:

v6 branch- examples framework-nextjs-app-directory pnpm i gives │ Error [ERR_REQUIRE_ESM]: require() of ES Module /...../keystone-6/node_modul │ index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contain │ Instead either rename index.js to end in .cjs, change the requiring code to use dynamic import() which

keystone-next-15 branch <--- I need next 15 Pulled the examples/ framework-nextjs-app-directory outside of directory Tried npm and pnpm install still fails with

> keystone postinstall Your GraphQL schema is not up to date  ELIFECYCLE  Command failed with exit code 1.

cheryl-c-tirerack avatar May 08 '25 14:05 cheryl-c-tirerack

The projects inside examples is not guaranteed that all of them have the schemas synchronized. You might need to do that manually until it will get fixed. PRs are welcome for that.

How do I manually do that?

cheryl-c-tirerack avatar May 08 '25 14:05 cheryl-c-tirerack

You need to run once the build or dev server, and schema should be updated.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   schema.graphql

unrevised6419 avatar May 10 '25 14:05 unrevised6419