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

npm run dev has to be restarted after Prisma change. #52

Closed
kluplau opened this issue Apr 10, 2022 · 1 comment
Closed

npm run dev has to be restarted after Prisma change. #52

kluplau opened this issue Apr 10, 2022 · 1 comment

Comments

@kluplau
Copy link

kluplau commented Apr 10, 2022

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. Init Blues template
  2. Add author String to schema.prisma
  3. Update note.server.ts with author key.
  4. Add <p className="py-6">{data.note.author}</p> to $noteId.tsx
  5. In new.tsx copy functionality from title and name it author.
  6. Run migration npx prisma migrate dev --name adding-author
  7. Navigate to http://localhost:3000/notes/new and try to create a new note

Expected Behavior

New note will be displayed after submit.

Actual Behavior

Error is shown. You have to rerun npm run dev to get it working again.

@kluplau kluplau changed the title npm run dev has to be restart after Prisma change. npm run dev has to be restarted after Prisma change. Apr 10, 2022
@mcansh
Copy link
Contributor

mcansh commented Jun 8, 2022

this is due to prisma generate making changes to node_modules, you could add a check for node_modules/@prisma/client to the purgeRequireCache function

@mcansh mcansh closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants