sanity-io / sanity-template-vercel-visual-editing

https://sanity-template-vercel-visual-editing-git-preview.sanity.build
38 stars 14 forks source link

Bug: Fresh install from Vercel throws error Module not found: Can't resolve '@floating-ui/react-dom' #76

Closed DanielHirunrusme closed 9 months ago

DanielHirunrusme commented 9 months ago

Steps to reproduce the behavior:

  1. Go to Vercel's Starter Projects
  2. Click on Visual Editing with Sanity
  3. Click Deploy
  4. After connecting, it begins building
  5. Error below while installing dependencies

[09:32:25.349] Cloning github.com/DanielHirunrusme/ctk-next-sanity (Branch: main, Commit: 384d6b5)
[09:32:26.411] Previous build cache not available
[09:32:26.606] Cloning completed: 1.257s
[09:32:27.403] Running "vercel build"
[09:32:27.908] Vercel CLI 32.6.1
[09:32:28.290] Installing dependencies...
[09:32:33.563] npm WARN deprecated next-google-fonts@2.2.0: As of Next.js 10.2, Google Fonts are automatically optimized! For more info, see https://github.com/joe-bell/next-google-fonts
[09:32:56.351] 
[09:32:56.352] added 895 packages in 28s
[09:32:56.353] 
[09:32:56.353] 195 packages are looking for funding
[09:32:56.353]   run `npm fund` for details
[09:32:56.379] Detected Next.js version: 14.0.3
[09:32:56.386] Detected `package-lock.json` generated by npm 7+
[09:32:56.387] Running "npm run build"
[09:32:56.931] 
[09:32:56.931] > build
[09:32:56.932] > next build
[09:32:56.933] 
[09:32:57.524] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[09:32:57.525] This information is used to shape Next.js' roadmap and prioritize features.
[09:32:57.525] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[09:32:57.525] https://nextjs.org/telemetry
[09:32:57.526] 
[09:32:57.628]    ▲ Next.js 14.0.3
[09:32:57.629] 
[09:32:57.629]    Creating an optimized production build ...
[09:33:47.144] Failed to compile.
[09:33:47.144] 
[09:33:47.145] ./node_modules/@sanity/overlays/dist/_chunks/Overlays-yIeqf3KO.js
[09:33:47.145] Module not found: Can't resolve '@floating-ui/react-dom'
[09:33:47.145] 
[09:33:47.146] https://nextjs.org/docs/messages/module-not-found
[09:33:47.146] 
[09:33:47.146] Import trace for requested module:
[09:33:47.146] ./node_modules/@sanity/overlays/dist/_chunks/index-JtjVptJR.js
[09:33:47.146] ./node_modules/@sanity/overlays/dist/index.js
[09:33:47.146] ./components/preview/SanityVisualEditing.tsx
[09:33:47.147] ./pages/_app.tsx
[09:33:47.147] 
[09:33:47.147] 
[09:33:47.147] > Build failed because of webpack errors
[09:33:47.235] Error: Command "npm run build" exited with 1
[09:33:47.683]  ```