None of the codesandbox examples work
This applies to all of the examples, when clicking the Codesandbox link it fails to build with an error. Error from this example is the following:
yarn run v1.22.19
$ keystone dev
✨ Starting Keystone
✘ [ERROR] Could not resolve "../example-utils"
keystone.ts:2:30:
2 │ import { fixPrismaPath } from '../example-utils';
╵ ~~~~~~~~~~~~~~~~~~
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentationabout this command.
Codesandbox link: https://githubbox.com/keystonejs/keystone/tree/main/examples/usecase-blog
in keystone.ts delete line 2, 11,12 in your sandbox, refresh the browser after the change
Keystone is currently broken with latest version of next #8575
@JonasGruenwald You have to copy this (https://github.com/keystonejs/keystone/blob/main/examples/example-utils.ts) file's content and create new file with the same name and put that file inside of root dir of that sandbox after that just do this,
import { fixPrismaPath } from '../example-utils';
to
import { fixPrismaPath } from './example-utils';
in keystone.ts file
Still not fixed :(
@sadakura unfortunately we don't know of an easy fix for this at this time - open to any suggestions :)
@sadakura unfortunately we don't know of an easy fix for this at this time - open to any suggestions :)
sorry if I have insulted someone, no I'm not similar with these things to help, just looked up for demo :) great project anyway.
The workaround suggested by @kisankumavat works fine btw.
I don't really care but I guess since example-utils.ts just exports a single line function it could just be added or in-lined into all the example repos?
This isn't just the fixPrismaPath, it seems that #9112 introduced a larger issue.
Unless I manually give the deps non-workspace or catalog values, I get stuck on a select dep screen, which I can't progress past:
If I update the dep values, and restart, I get to the example-utils error:
I'm going to spend a little time looking for solutions.
@kennedybaird indeed, the trade-off was to help make my life easier in keeping the examples up to date.
I'm happy for us to inline the fixPrismaPath code for each example, but the version updates are a pain and I'm trying to reduce the complexity of our release process.