`Cannot find package 'vite'` on Vercel build only
LauraBeatris opened this issue · 3 comments
Description
Using Next.js 14.0.3 with Bun for dependencies management.
Following the documentation: https://vercel.com/docs/speed-insights/quickstart, I've installed the package and rendered the component in the layout module.
Running the build script on my local environment doesn't lead to compilation errors. However, when running the deployment on Vercel, getting the following error:
Expected Behavior
Would expect to be able to just install the package, render the component as guided, and get the deployment working leading to analytics insights on my Vercel dashboard.
Related issues
Took a look at a current open issue and saw some mentions around Vite, not sure if it's related, but flagging it for the maintainers: #44
I believe the problem is due to the fact that this version of node is not compatible with Vite in the Vercel environment.
Vite recommends node 18+ or 20+ (recommended)
This version difference may be causing difficulty in finding the 'vite' package during the build and deploy process on Vercel
Hi @LauraBeatris we had a fix in 1.0.6, can you try to upgrade to see if it resolves your issue? Thanks
@huozhi Working now with the latest package version, thank you for fixing it in such a timely manner!