Let me check the current state of the files to understand why the error persists.
I can see that html already has position: relative in globals.css. The issue is that Lenis in root mode wraps the <html> element as the scroll container, but the v0 preview environment may inject a wrapper that interferes. The best fix is to avoid root mode entirely and instead use a wrapper <div> as the scroll container with an explicit non-static position.
The problem is that ReactLenis root tries to use the <html> element as the scroll container, but the preview environment wraps it in a non-positioned container. The fix is to stop using root mode and instead use a wrapper <div> with position: relative as an explicit scroll container.
Wait -- the typeof window check won't help during SSR and the root mode itself is what causes the warning. Let me take a simpler approach: drop root mode entirely and use a wrapper-based scroll container instead.
I replaced the ReactLenis root mode approach with a vanilla Lenis instance created directly via useEffect. This completely avoids the container position warning since it no longer uses the ReactLenis component's root wrapper that tries to find and validate a scroll container element. The smooth scrolling behavior is preserved identically via the same lerp, duration, and smoothWheel options, and it cleans up properly on unmount.
An error occurred during deployment. Please fix:
Running build in Washington, D.C., USA (East) – iad1
Build machine configuration: 2 cores, 8 GB
Retrieving list of deployment files...
Previous build caches not available.
Downloading 94 deployment files...
...
Traced Next.js server files in: 60.202ms
Created all serverless functions in: 174.979ms
Collected static files (public/, static/, .next/static): 4.52ms
Build Completed in /vercel/output [29s]
Error: Vulnerable version of Next.js detected, please update immediately. Learn More: https://vercel.link/CVE-2025-66478
The current Next.js version is 16.0.3, which is vulnerable. According to the security advisory, the patched version for Next.js 16.0.x is 16.0.10.
Updated Next.js from 16.0.3 to 16.0.10, the patched release that addresses the React2Shell vulnerability (CVE-2025-66478). This should resolve the deployment blocker since Vercel rejects deployments of vulnerable Next.js versions. Your next deploy should go through successfully.