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

@prisma/extension-pulse is not exported from package #24130

Open
jeffreybos opened this issue May 8, 2024 · 6 comments
Open

@prisma/extension-pulse is not exported from package #24130

jeffreybos opened this issue May 8, 2024 · 6 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/pdp Issue for team Prisma Data Platform. topic: Next.js topic: @prisma/extension-pulse

Comments

@jeffreybos
Copy link

jeffreybos commented May 8, 2024

Bug description

I want to use Prisma Pulse, but when i import (and ofcourse i installed the package with NPM) the package. I get the following error.

./lib/db.ts:2:0 Module not found: Package path . is not exported from package /node_modules/@prisma/extension-pulse (see exports field in /node_modules/@prisma/extension-pulse/package.json)

I've checked the node_modules and @prisma/extension-pulse is in there

image

I'm. using NextJS 14.1.4 and Prisma 5.13.0 and @prisma/extension-pulse 1.0.2

How to reproduce

Expected behavior

No response

Prisma information

// prisma/schema.prisma
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

enum UserRole {
  ADMIN
  USER
}

model User {
  id                    String                 @id @default(cuid())
  name                  String?
  email                 String?                @unique
  emailVerified         DateTime?
  image                 String?
  password              String?
  role                  UserRole               @default(USER)
  accounts              Account[]
  isTwoFactorEnabled    Boolean                @default(false)
  twoFactorConfirmation TwoFactorConfirmation?
  Team                  Team[]
}

model Account {
  id                String  @id @default(cuid())
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String? @db.Text()
  access_token      String? @db.Text()
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String? @db.Text()
  session_state     String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model VerificationToken {
  id      String   @id @default(cuid())
  email   String
  token   String   @unique
  expires DateTime

  @@unique([email, token])
}

model PasswordResetToken {
  id      String   @id @default(cuid())
  email   String
  token   String   @unique
  expires DateTime

  @@unique([email, token])
}

model TwoFactorToken {
  id      String   @id @default(cuid())
  email   String
  token   String   @unique
  expires DateTime

  @@unique([email, token])
}

model TwoFactorConfirmation {
  id String @id @default(cuid())

  userId String
  user   User   @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([userId])
}

model Team {
  id     String @id @default(cuid())
  name   String
  userId String
  user   User   @relation(fields: [userId], references: [id], onDelete: Cascade)
}

Environment & setup

NextJS 14.1.4

Prisma Version

Prisma 5.13.0
Pulse 1.0.2

@jeffreybos jeffreybos added the kind/bug A reported bug. label May 8, 2024
@janpio janpio added topic: @prisma/extension-pulse team/pdp Issue for team Prisma Data Platform. bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels May 8, 2024
@rtbenfield
Copy link

Hi @jeffreybos 👋🏻 Thanks for raising this. With your NextJS app, are you attempting to use Prisma Pulse in an edge function or serverless function?

@jeffreybos
Copy link
Author

I'm using it with supabase. I followed the prisms pulse guide for setting up my project.

But the issue right now is that the installed pulse npm package is not recognized as a module

@katungi
Copy link

katungi commented May 9, 2024

I have just encountered the same issue currently. I am also using supabase.

@rwenzlofsky
Copy link

I have the same issue

@raamponsah
Copy link

I am using postgresql on railway

@nurul3101
Copy link
Member

Hey folks!

Can you please confirm that you have set customConditions in your "tsconfig.json" file as specified here?

Screenshot 2024-05-13 at 5 32 23 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/pdp Issue for team Prisma Data Platform. topic: Next.js topic: @prisma/extension-pulse
Projects
None yet
Development

No branches or pull requests

7 participants