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

Cannot run generate command with typedSql #201

Open
djshubs opened this issue Sep 23, 2024 · 2 comments
Open

Cannot run generate command with typedSql #201

djshubs opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@djshubs
Copy link

djshubs commented Sep 23, 2024

Bug report

Describe the bug

Prisma 5.19.1 has a preview feature for 'typedSql'. The existing dependencies for @snaplet/seed references and older version (5.14.x-dev).

As a result, whenever npx @snaplet/seed generate command is run it errors out.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Install the latest version of Prisma:
npm install prisma --save-dev
npm install @prisma/client

Expected behavior

Should generate model.

Screenshots

CleanShot 2024-09-23 at 13 51 50@2x

System information

  • OS: macOS Seqouia
  • Version of supabase-js: 1.192.5
  • Version of Node.js: v20.11.1
  • Version of Prisma: 5.19.1

Additional context

I tried to go into the node_modules and run ncu -i to update the prisma dependencies, but I would get an error for "workspace:*" not found or something similar to that. I'm using NPM to install.

@djshubs djshubs added the bug Something isn't working label Sep 23, 2024
@djshubs
Copy link
Author

djshubs commented Sep 23, 2024

The following seems to have fixed the issue.

I was able to update the dependencies by going to node_modules/@snaplet/seed and updating the package.json for the packages as follows:

    "@prisma/generator-helper": "5.19.1",
    "@prisma/internals": "5.19.1",

I also went to node_modules/@prisma and went through each folder's package.json and deleted any of them that referenced the 5.14 version.

Then I ran npm install and it update the underlying dependencies. I validated it with package-lock.json.

EDIT: Easier solution... add the following to your package.json

  "overrides": {
    "@snaplet/seed": {
      "@prisma/generator-helper": "^5.19.1",
      "@prisma/internals": "^5.19.1"
    }
  },

@djshubs
Copy link
Author

djshubs commented Sep 25, 2024

I decided to uninstall @snaplet/seed because it caused issues with prismaSchemaFolder as it couldn't run generate in the schema from a schema folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant