Skip to content

Unable to start Prisma Client error when I run prisma studio  #644

@mhdalmajid

Description

@mhdalmajid
  1. Prisma version (prisma -v or npx prisma -v):
➜  myweb yarn prisma -v
yarn run v1.22.10
$ D:\Desktop\myweb\node_modules\.bin\prisma -v
Environment variables loaded from .env
prisma               : 2.19.0
@prisma/client       : 2.19.0
Current platform     : windows
Query Engine         : query-engine c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d (at node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine     : migration-engine-cli c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d (at node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d (at node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary        : prisma-fmt c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d (at node_modules\@prisma\engines\prisma-fmt-windows.exe)
Studio               : 0.358.0
  1. Logs from Developer Tools Console or Command line, if any:
➜  myweb yarn prisma studio
yarn run v1.22.10
$ D:\Desktop\myweb\node_modules\.bin\prisma studio
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Starting Prisma Studio ...
Generating Prisma Client ... done
Prisma Studio is up on http://localhost:5555
Unable to start Prisma Client:  C:\Users\utbah\AppData\Roaming\Prisma\Studio\fcde89c2\index.js:194
path.join(process.cwd(), './C:\Users\utbah\AppData\Roaming\Prisma\Studio\fcde89c2\schema.prisma');
                                    ^^^^^^

SyntaxError: Invalid Unicode escape sequence
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at PCW.start (D:\Desktop\myweb\node_modules\prisma\build\index.js:100018:171)
    at PrismaService.respond (D:\Desktop\myweb\node_modules\prisma\build\index.js:100285:65)
    at D:\Desktop\myweb\node_modules\prisma\build\index.js:102458:65
Unable to start Prisma Client:  C:\Users\utbah\AppData\Roaming\Prisma\Studio\fcde89c2\index.js:194
path.join(process.cwd(), './C:\Users\utbah\AppData\Roaming\Prisma\Studio\fcde89c2\schema.prisma');
                                    ^^^^^^
  1. Does the issue persist even after updating to the latest prisma alpha? (npm i -D @prisma/cli@dev)
    yes
  2. Prisma schema (if relevant):
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

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

enum Role {
  USER
  ADMIN
}

model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  password  String
  name      String?
  role      Role     @default(USER)
  posts     Post[]
  profile   Profile?
  createdAt DateTime @default(now())
  updatedAt DateTime @default(now())
}

model Profile {
  id     Int    @id @default(autoincrement())
  bio    String
  user   User   @relation(fields: [userId], references: [id])
  userId Int
}

model Post {
  id                Int                 @id @default(autoincrement())
  createdAt         DateTime            @default(now())
  title             String
  content           String
  published         Boolean             @default(false)
  author            User                @relation(fields: [authorId], references: [id])
  authorId          Int
  categories        Category[]          @relation(references: [id])
  CategoriesOnPosts CategoriesOnPosts[]
}

model Category {
  id                Int                 @id @default(autoincrement())
  name              String
  posts             Post[]              @relation(references: [id])
  CategoriesOnPosts CategoriesOnPosts[]
}

model CategoriesOnPosts {
  post       Post     @relation(fields: [postId], references: [id])
  postId     Int // relation scalar field (used in the `@relation` attribute above)
  category   Category @relation(fields: [categoryId], references: [id])
  categoryId Int // relation scalar field (used in the `@relation` attribute above)
  createdAt  DateTime @default(now())

  @@id([postId, categoryId])
}

prisma

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownBug is new, does not have information for reproduction or reproduction could not be confirmed.kind/bugA reported bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions