Spent several days troubleshooting. No luck. At the end of my wits here.
I have a form on a ReactJS/Vite website. I want data in form to write to Google Sheets after form submission.
I've used the "googleapis" npm package successfully as a nodejs app before. But, this is my first time using it in a reactjs/vite website.
When I import the module,
import { google } from "googleapis";
my website fails to load and I get bellow error in the console: enter image description here If I delete this import statement, my website runs fine.
I tried switching to "google-spreadsheet" node package. No error. But this package requires I use "google-auth-library" package. When I import,
import { JWT } from "google-auth-library";
my website fails to load and I get bellow error in the console: enter image description here
I tried googling everything. I have no idea what is happening.