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

New raw functions not exported from @prisma/client #2566

Closed
arvindell opened this issue May 26, 2020 · 9 comments · Fixed by #2578
Closed

New raw functions not exported from @prisma/client #2566

arvindell opened this issue May 26, 2020 · 9 comments · Fixed by #2578
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: raw $queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli
Milestone

Comments

@arvindell
Copy link

arvindell commented May 26, 2020

Bug description

I updated to beta.6 and tried to use sql and join tags. They, however, don't seem to be exported:
Screen Shot 2020-05-26 at 14 23 47

Environment & setup

  • OS: MacOS
  • Database: MySQL
  • Prisma version: beta.6
  • Node.js version: 12.16
@Sytten
Copy link
Contributor

Sytten commented May 26, 2020

A couple of questions:

  1. Did you also upgrade the cli when you updated the client?
  2. Did you regenerate the client?
    Honestly it should work... You can view the diff of the export here: https://github.com/prisma/prisma/pull/2311/files#diff-65510f7215f727807c5679ea0d99d99f

@arvindell
Copy link
Author

Hmm, I updated my dependencies with npm i --save-dev @prisma/client@latest @prisma/cli@latest and regenerated the client too 😐

@arvindell
Copy link
Author

This is only a problem when I compile the code, I can use ts-node-dev fine.

@arvindell
Copy link
Author

When I open the index.d.ts file inside node_modules I can even see that the utilities are not used:

Screen Shot 2020-05-26 at 19 08 51

@GrzegorzWidla
Copy link

As @AlexVilchis said: sql, empty, join and raw are imported to node_modules/.prisma/client/index.d.ts definitions file but not exported.

Clean installs of both @prisma/client@2.0.0-beta.6 and @prisma/cli@2.0.0-beta.6 and npx prisma generate ran afterwards.

@janpio janpio added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. topic: raw $queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli labels May 27, 2020
@Sytten
Copy link
Contributor

Sytten commented May 27, 2020

Confirmed, the code is missing here for TS: https://github.com/prisma/prisma/blob/master/src/packages/client/src/generation/TSClient.ts#L123
Most likely a bad merge.

@timsuchanek
Copy link
Contributor

Thanks for reporting! We'll look into it

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels May 27, 2020
@pantharshit00
Copy link
Contributor

I can also confirm the issue

@Jolg42
Copy link
Member

Jolg42 commented May 28, 2020

@timsuchanek needs to fix something here before we can close it 👍

@Jolg42 Jolg42 added this to the Beta 7 milestone May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: raw $queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants