You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating and exporting a client middleware using createMiddleware().client() causes an internal server error with the following message:
Internal server error: createMiddleware must be called with a "use" property!
The bug seems to originate from vite-plugin-tanstack-start-create-server-fn
Full error message:
[vite] Internal server error: createMiddleware must be called with a "use" property!
Plugin: vite-plugin-tanstack-start-create-server-fn
File: /.../tanstack-start/app/middleware/logger.ts
at Object.handleCreateMiddlewareCallExpression [as handleCallExpression] (file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/compilers.js:261:11)
at file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/compilers.js:113:40
at Array.forEach (<anonymous>)
at file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/compilers.js:112:44
at Array.forEach (<anonymous>)
at enter (file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/compilers.js:111:24)
at NodePath._call (/.../tanstack-start/node_modules/@babel/traverse/lib/path/context.js:49:20)
at NodePath.call (/.../tanstack-start/node_modules/@babel/traverse/lib/path/context.js:39:18)
at NodePath.visit (/.../tanstack-start/node_modules/@babel/traverse/lib/path/context.js:88:31)
at TraversalContext.visitQueue (/.../tanstack-start/node_modules/@babel/traverse/lib/context.js:90:16)
at TraversalContext.visitSingle (/.../tanstack-start/node_modules/@babel/traverse/lib/context.js:66:19)
at TraversalContext.visit (/.../tanstack-start/node_modules/@babel/traverse/lib/context.js:113:19)
at traverseNode (/.../tanstack-start/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at Module.traverse (/.../tanstack-start/node_modules/@babel/traverse/lib/index.js:53:34)
at compileStartOutput (file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/compilers.js:24:9)
at TransformPluginContext.transform (file:///.../tanstack-start/node_modules/@tanstack/start-vite-plugin/dist/esm/index.js:44:24)
at EnvironmentPluginContainer.transform (file:///.../tanstack-start/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:47224:19)
at async loadAndTransform (file:///.../tanstack-start/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:41034:27)
Which project does this relate to?
Start
Describe the bug
Creating and exporting a client middleware using
createMiddleware().client()
causes an internal server error with the following message:The bug seems to originate from
vite-plugin-tanstack-start-create-server-fn
Full error message:
Your Example Website or App
https://github.com/thephilippbusch/tanstack-start
Steps to Reproduce the Bug or Issue
bun dev
Expected behavior
createMiddleware().client() to work properly
Screenshots or Videos
No response
Platform
Additional context
I manually setup the project using the Build from Scratch guide from the docs.
The text was updated successfully, but these errors were encountered: