SvelteKit build error: Node modules could not be resolved
Hi, I have a SvelteKit project with
I have googled around and deduce that the problem is these core node modules need to be polyfilled (cmiiw). I have tried various polyfilling packages that I could find on Google (
googleapis package installed. I tried deploying it to Pages with cloudflare adapter but the build failed with errors like the following:I have googled around and deduce that the problem is these core node modules need to be polyfilled (cmiiw). I have tried various polyfilling packages that I could find on Google (
vite-plugin-node-polyfills, @esbuild-plugins/node-globals-polyfill, @esbuild-plugins/node-modules-polyfill), however none seems to be solving the problem. Is there any solution for this? I use googleapis to utilize the Google Sheets API to retrieve data from a spreadsheet