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 ?10 Replies
is there a live site or some reproduction to debug this?
right version
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
and no code changes related to the components?
no, I think it may be related to vercel preset
or my turbo / pnpm configuration
yep, seems to be the case for multiple solid instances
do you remember related problems ? (multiple solidjs versions in monorepo, or any hint that could help me stabilize this thing ?)
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
aliaspnpm 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
most likely a cache issue
https://www.npmjs.com/package/solid-js/v/1.8.17