TanStackT
TanStack2mo ago
10 replies
colossal-harlequin

Nitro v3 not working

Hi! I'm trying to use Nitro v3 with TanStack Start but running into a package.json imports issue.
Error:
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#tanstack-router-entry" is not defined in package /app/.output/server/node_modules/@tanstack/start-server-core/package.json imported from /app/.output/server/node_modules/@tanstack/start-server-core/dist/esm/createStartHandler.js
Setup:
TanStack Start 1.136.6
Nitro v3 (3.0.1-alpha.1) via nitro/vite plugin
Node.js 22.11.0
Deployment: Dokploy (Docker/Node.js)
What I've tried:
Configured nitro.config.ts with preset: 'node-server', noExternals: false, nodeModulesDirs
Added nitro: {} to vite.config.ts per docs
Ensured node_modules are copied to output
The #tanstack-router-entry import is defined in start-client-core/package.json but code tries to import from start-server-core
Current workaround:
Using @tanstack/nitro-v2-vite-plugin which works, but would prefer v3 for future compatibility.
Question:
Is there a known solution or workaround for this package.json imports issue with Nitro v3? Or should I stick with v2 until v3 is more stable?
Thanks!
Was this page helpful?