bun icon indicating copy to clipboard operation
bun copied to clipboard

Prisma does not work when imported from a monorepo on Windows

Open supern64 opened this issue 10 months ago • 0 comments

What version of Bun is running?

1.1.3+2615dc742

What platform is your computer?

Microsoft Windows NT 10.0.19044.0 x64

What steps can reproduce the bug?

Importing Prisma from a monorepo doesn't work on Windows. It works on linux without any errors. Minimal repro: https://github.com/supern64/prisma-monorepo-minimal-repro

  1. bun install
  2. bun run init
  3. bun start

What is the expected behavior?

Every time you run bun start, the application says There are x users in the database, where x is an increasing number. This is how it runs on a Linux host (Linux 5.4.0-105-generic x86_64 x86_64):

[user]@[host]:~/prisma-monorepo-minimal-repro$ bun start
$ bun packages/server/main.ts
There are 1 users in the database.
[user]@[host]:~/prisma-monorepo-minimal-repro$ bun start
$ bun packages/server/main.ts
There are 2 users in the database.
[user]@[host]:~/prisma-monorepo-minimal-repro$ bun start
$ bun packages/server/main.ts
There are 3 users in the database.

What do you see instead?

$ bun packages/server/main.ts
error: Unexpected reading "[project root]\node_modules\database"
error: script "start" exited with code 1

Additional information

No response

supern64 avatar Apr 09 '24 19:04 supern64