batman✅
Need help debugging this error: Client-only API called on the server side. Run client-only code in
My solid start project works fine in dev mode, but when I try to do
vinxi build
followed by vinxi start
I get the below error:
I tried addressing the problem by wrapping browser specific API calls with onMount and Show, but I have had no luck so far. My main issue is this error does not tell me which is the offending file and I end up playing the guessing game. Please guide me about how do I resolve this.
OS: macOS 15.2
Node: 23.5.0
"@solidjs/start": "^1.0.10",
"solid-js": "^1.9.2",
"vinxi": "^0.5.1"
What have I tried so far?
- Tried running vinxi in debug mode. Probably not doing it right.
- From the above trace: - .output/server/node_modules/solid-js/web/dist/server.js: 1136:9 this is most likely framework code.
.output/server/chunks/nitro/nitro.mjs:7177:17797 : minified server code too11 replies