S
SolidJS2mo ago
LionelS

Broken vercel deployment with solidstart 1.0.0 and pnpm monorepo - clientOnly does not load

Hi, I'm trying to deploy a solidstart app from a pnpm monorepo to vercel. import { clientOnly } from "@solidjs/start"; const ClientMapOnlyComponent = clientOnly(() => import("../Map")); export default function LeafletMap(props?: any) { return <ClientMapOnlyComponent />; } For some reason, it is ok with the vercel dev command but when deployed, the component does not load. (and sometimes, it is ok even in vercel environment) Could anyone help me ?
No description
10 Replies
mdynnl
mdynnl2mo ago
is there a live site or some reproduction to debug this?
LionelS
LionelS2mo ago
right version
No description
LionelS
LionelS2mo ago
it is kind of random, I think I'll have to set up a minimal repo to reproduce https://purojekutomaneja-1goe8p5pv-datahome.vercel.app/ => working https://purojekutomaneja-rfa0rdnqp-datahome.vercel.app/ => not working
mdynnl
mdynnl2mo ago
and no code changes related to the components?
LionelS
LionelS2mo ago
no, I think it may be related to vercel preset or my turbo / pnpm configuration
mdynnl
mdynnl2mo ago
yep, seems to be the case for multiple solid instances
LionelS
LionelS2mo ago
do you remember related problems ? (multiple solidjs versions in monorepo, or any hint that could help me stabilize this thing ?)
mdynnl
mdynnl2mo ago
it's fairly common with monorepos and the solution is usually to find the multiple instances and get them to point to the same instance you could probably start with pnpm list --depth Infinity | grep solid-js some pnpm version doesn't provide ls alias
LionelS
LionelS2mo ago
pnpm ls seems to catch dependencies from workspace root I'll do it in pnpm-lock.yaml file @mdynnl I had to align @solid/router version for the whole monorepo, it seems fine now There was also a non-existing solidjs tag 1.8.17 I had to downgrade
mdynnl
mdynnl2mo ago
Want results from more Discord servers?
Add your server
More Posts