S
SolidJS7mo 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
mdynnl7mo ago
is there a live site or some reproduction to debug this?
LionelS
LionelSOP7mo ago
right version
No description
LionelS
LionelSOP7mo 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
mdynnl7mo ago
and no code changes related to the components?
LionelS
LionelSOP7mo ago
no, I think it may be related to vercel preset or my turbo / pnpm configuration
mdynnl
mdynnl7mo ago
yep, seems to be the case for multiple solid instances
LionelS
LionelSOP7mo ago
do you remember related problems ? (multiple solidjs versions in monorepo, or any hint that could help me stabilize this thing ?)
mdynnl
mdynnl7mo 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
LionelSOP7mo 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
mdynnl7mo ago
Want results from more Discord servers?
Add your server