[email protected] turbopack incompatible with typeorm? The "paths[0]" argument must be of type string. Received undefined
#76882
simon300000
started this conversation in
Turbopack Error Report
Replies: 1 comment 1 reply
-
I got same issue recently. Added this to next.config.ts and it works.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I was gonna write an issue, but I am not sure if this is actually cause by next.js or typeorm.
It seems like, turbopack will cause
The "paths[0]" argument must be of type string. Received undefined
, when typeorm is involved in server actions.I have a reproduce repository: https://github.com/simon300000/turbopack-reproduce
To reproduce:
npm install
npm run dev
npm run dev without turbopack works fine.
build is not affected.
Also exist on next@latest, but reproduce template gave me canary.
I can reproduce this issue with GitHub codespace as well
Affected Version
I tested different next versions, it seems like this issue first appeared on 5.2.0, 5.1.7 was not affected.
For canary version, [email protected] wan affected, [email protected] was not.
There might be one commit from v15.2.0-canary.39...v15.2.0-canary.40
that caused this?
Additional information
Example
https://github.com/simon300000/turbopack-reproduce
Error in console
⨯ TypeError: The "paths[0]" argument must be of type string. Received undefined
at [project]/node_modules/typeorm/globals.js [app-rsc] (ecmascript) (file:/workspaces/turbopack-reproduce/src/globals.ts:4:0)
at [project]/node_modules/typeorm/index.js [app-rsc] (ecmascript) (file:/workspaces/turbopack-reproduce/src/index.ts:9:0)
at [project]/app/a.ts [app-rsc] (ecmascript) (app/a.ts:2:0)
at [project]/.next-internal/server/app/page/actions.js { ACTIONS_MODULE0 => "[project]/app/a.ts [app-rsc] (ecmascript)" } [app-rsc] (server actions loader, ecmascript) (.next/server/chunks/ssr/[root of the server]__21588afe..js:178:134)
at [project]/.next-internal/server/app/page/actions.js { ACTIONS_MODULE0 => "[project]/app/a.ts [app-rsc] (ecmascript)" } [app-rsc] (server actions loader, ecmascript) (.next/server/chunks/ssr/[root of the server]__21588afe..js:200:351)
at Object. (.next/server/app/page.js:22:9)
2 | import { PlatformTools } from "./platform/PlatformTools"
3 | import { DataSourceOptions } from "./data-source/DataSourceOptions"
Beta Was this translation helpful? Give feedback.
All reactions