-
-
Notifications
You must be signed in to change notification settings - Fork 115
Description
I receive this error from the prod server:
app serve: Server running on http://0.0.0.0:8080
app serve: [one] Error handling request: TypeError: Cannot read properties of undefined (reading 'cleanPath')
app serve: at Object.handlePage (file:///workspaces/project/node_modules/one/dist/esm/server/oneServe.mjs:89:74)
app serve: at file:///workspaces/project/node_modules/one/dist/esm/createHandleRequest.mjs:82:112
app serve: at runMiddlewares (file:///workspaces/project/node_modules/one/dist/esm/createHandleRequest.mjs:9:42)
app serve: at file:///workspaces/project/node_modules/one/dist/esm/createHandleRequest.mjs:82:44
app serve: at file:///workspaces/project/node_modules/one/dist/esm/vite/resolveResponse.mjs:7:32
app serve: at file:///workspaces/project/node_modules/one/dist/esm/vite/one-server-only.mjs:22:17
app serve: at AsyncLocalStorage.run (node:async_hooks:346:14)
app serve: at runWithAsyncLocalContext (file:///workspaces/project/node_modules/one/dist/esm/vite/one-server-only.mjs:21:42)
app serve: at file:///workspaces/project/node_modules/one/dist/esm/vite/resolveResponse.mjs:5:5
app serve: at new Promise (<anonymous>)
I'm using:
- Bun (1.1.43)
- Node (v20.18.1)
- one (1.1.411)
- SSR as the default render mode
My file structure is like this:
app/
_layout.tsx
home/
_layout.tsx
index+ssg.tsx
search/
_layout.tsx
[query].tsx
The app-level _layout I've left there the whole time. For the other 2, I think it works fine when any of:
- both _layout files are present
- both _layout files are gone
- the layout is only present in search
But it breaks when:
- the layout is only present in /home, but not in /search.
I'm reasonably sure that this occurs with SPA-mode as well, but can double check! I would guess there's a central cause, but obviously I don't know.
I also have run into the same logged issue with a bunch of different combinations of file structures, including using (core) or [query] as folders. They've all worked completely fine in development, but then certain routes would break. And, most of the routes still work in prod. This is just the first time I nailed it down to one finite change that broke it! Happy to try to help, but I'm not exactly sure where it's best to start!