-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
[turbopack + prisma] TypeError: The "path" argument must be of type string. Received undefined #76497
Comments
Confirmed this also happens in the stable 15.2.0 next release
|
Same error here. I can confirm that it works when downgrading to |
Same behaviour with the @google-cloud/logging-winston package import { LoggingWinston } from '@google-cloud/logging-winston'; Will also throw the [turbopack] TypeError: The "path" argument must be of type string. Received undefined error |
for reference, we have our database as a package, and load it like thus:
|
We got the same error, using turborepo and export the db as package, same as @davecarlson |
This comment has been minimized.
This comment has been minimized.
Did not mention it but I also have the database as a package within a monorepo using Turborepo, which is why I use a custom output path to manage multiple database packages. However, I have simplified the reproduction case as it is not directly related to the issue. If you are only working with a single database in your monorepo, a quick workaround would be to avoid using a custom output path for the generated |
related to this issue as well. boxyhq/jackson#3657 (comment) |
I'm also encountering this error when trying to import import { PubSub } from "@google-cloud/pubsub" The issue seems to be that console.log("__dirname", __dirname) With Webpack, the directory containing the file is correctly printed. However, when using Turbopack, __dirname undefined |
same issue after upgrading to 15.2, prisma as a separate package in monorepo with custom output path |
seeing same thing after 15.2 upgrade with EDIT: running |
removing the turbo flag works. makes you appreciate how quick the thing is :( |
Link to the code that reproduces this issue
https://github.com/DiPSoMaNiE/next-canary-prisma-issue
To Reproduce
bun install
prisma generate
bun dev
http://localhost:3000
and see errorCurrent vs. Expected behavior
This error occurs when:
[email protected]
or above (works on15.2.0-canary.39
and below)next dev --turbopack
(works withnext dev
ornext build
which use webpack)generator
block ofschema.prisma
To make it work:
output = "../generated"
line inprisma/schema.prisma
prisma generate
import { PrismaClient } from '../generated'
toimport { PrismaClient } from '@prisma/client'
insrc/db.ts
bun dev
http://localhost:3000
and see it worksEverything should work as expected with a custom output path for the generated
PrismaClient
.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041 Available memory (MB): 49152 Available CPU cores: 12 Binaries: Node: 22.14.0 npm: 10.9.2 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.2.0-canary.74 // Latest available version is detected (15.2.0-canary.74). eslint-config-next: 15.2.0-canary.74 react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The text was updated successfully, but these errors were encountered: