I am building an AstroJS project with Sanity as CMS - on my development environment everything works fine and the build is also successful
But when I try to deploy the project to vercel, I keep getting an error and the build fails
[vite]: Rollup failed to resolve import "tslib" from "/vercel/path0/node_modules/.pnpm/rxjs@7.8.1
I tried adding vite.config.ts
and try to externalise the tslib
.
I am kind of new to this vercel ecosystem and do not know the exact root of the problem.
I had the same issue, hitting the "Redeploy" button within Vercel and ensuring the cache is cleared fixed my issue!