question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keystone Nextjs walkthrough has broken steps

See original GitHub issue

Keystone Nextjs walkthrough has broken steps: https://keystonejs.com/docs/walkthroughs/embedded-mode-with-sqlite-nextjs

Just follow the above, some of the steps do not work.

node version: 16.x

$ yarn postinstall
yarn run v1.22.19
$ keystone postinstall
X [ERROR] Transforming let to the configured target environment ("es5") is not supported yet

    keystone.ts:5:0:
      5 │ let Post: Lists.Post = list({
        ╵ ~~~

  The target environment was set to "es5" here:

    tsconfig.json:3:14:
      3 │     "target": "es5",
        ╵               ~~~~~

Error: Build failed with 1 error:
keystone.ts:5:0: ERROR: Transforming let to the configured target environment ("es5") is not supported yet
    at failureErrorWithLog (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:1566:15)
    at C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:1024:28
    at runOnEndCallbacks (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:1438:61)
    at buildResponseToResult (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:1022:7)
    at C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:1134:14
    at responseCallbacks.<computed> (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:671:9)
    at handleIncomingPacket (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:726:9)
    at Socket.readFromStdout (C:\Users\Martin.M.Dawson\Documents\devkit-frontend-poc\node_modules\esbuild\lib\main.js:647:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: [Object],
      notes: [Array],
      pluginName: '',
      text: 'Transforming let to the configured target environment ("es5") is not supported yet'
    }
  ],
  warnings: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Please can you either specify the exact versions to use in the tutorial or provide an example of nextjs and keystone so we can lock down the exact versions to at least get set up.

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
flexdineshcommented, Dec 14, 2022

We don’t recommend embedded keystone anymore. We have updated the post with a note to check out the latest approach.

Keystone can now be imported and used in Next.js app using the getContext API.

Read more in the blog post: https://keystonejs.com/blog/nextjs-keystone

1reaction
flexdineshcommented, Oct 23, 2022

Hey @MartinDawson! Where did you find the link from? We have removed the embedded Next.js example from our website but it is still accessible via the old link. I think the indexer still picked it up somehow and listed in search results. We’ll make sure to remove it soon. Long story short, embedded next example uses experimental APIs and lots of things might not work as you expect it to or unintentionally break.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tweets with replies by Keystone JS (@KeystoneJS) / Twitter
Explore tutorials with step-by-step instruction on building solutions with Keystone. ... We got you covered. Check out our guide for auth and access...
Read more >
Build error with Keystone v5 – @keystonejs/app-next with ...
I ran into this yesterday, it works locally, but when I deploy it does not and I get the error you're getting.
Read more >
Build A Website with Keystone Next And Next.js | by Hussain Arif
To build a GraphQL API for a website, you would perform the following steps: Configure your database; Set up your back-end; Code your...
Read more >
Upgrade Guide - Next.js
Upgrade Guide. Upgrading from 12 to 13. To update to Next.js version 13, run the following command using your preferred package manager:
Read more >
Build a React-driven blog with Next.js and KeystoneJS - Medium
yo keystone. Here is an example of the steps of setting up KeystoneJS. Choosing template engine & CSS pre-processor is not important since ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found