Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the codesandbox examples work #8462

Open
JonasGruenwald opened this issue Apr 7, 2023 · 9 comments
Open

None of the codesandbox examples work #8462

JonasGruenwald opened this issue Apr 7, 2023 · 9 comments
Labels

Comments

@JonasGruenwald
Copy link

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

@husinzz
Copy link

husinzz commented Apr 28, 2023

in keystone.ts delete line 2, 11,12 in your sandbox, refresh the browser after the change

@Thinkscape
Copy link

Keystone is currently broken with latest version of next #8575

@kisankumavat
Copy link

kisankumavat commented Jun 1, 2023

@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

@sadakura
Copy link

sadakura commented Aug 4, 2023

Still not fixed :(

@dcousens
Copy link
Member

dcousens commented Aug 5, 2023

@sadakura unfortunately we don't know of an easy fix for this at this time - open to any suggestions :)

@sadakura
Copy link

sadakura commented Aug 5, 2023

@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.

@JonasGruenwald
Copy link
Author

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?

@dcousens dcousens added the 🐛 bug Unresolved bug label Nov 14, 2023
@kennedybaird
Copy link
Contributor

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:

image

If I update the dep values, and restart, I get to the example-utils error:

image

I'm going to spend a little time looking for solutions.

@dcousens
Copy link
Member

dcousens commented Aug 6, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants