When attempting to deploy my build on Vercel, I encountered an error. The deployment works fine locally, but when trying to build it on vercel, the following error occurs:
[![Type error: Type '(ref: HTMLDivElement | null) => HTMLDivElement | null' is not assignable to type 'LegacyRef<HTMLDivElement> | undefined'.
Type '(ref: HTMLDivElement | null) => HTMLDivElement | null' is not assignable to type '(instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly)'.
Type 'HTMLDivElement | null' is not assignable to type 'void | (() => VoidOrUndefinedOnly)'.
Type 'null' is not assignable to type 'void | (() => VoidOrUndefinedOnly)'.
48 | <>
49 | <div
> 50 | ref={(ref) => (node.current = ref)}
| ^
51 | css={(theme) => ({
52 | width: !isTabletOrMobile ? "auto" : "100vw",
53 | height: "98%",
error Command failed with exit code 1][1]][1]