theoephraim / node-google-spreadsheet

Google Sheets API wrapper for Javascript / Typescript
https://theoephraim.github.io/node-google-spreadsheet
The Unlicense
2.34k stars 390 forks source link

triggerUncaughtException error occurred #708

Closed G-hoon closed 1 week ago

G-hoon commented 1 month ago

image

I'm trying to get data from google spread sheet. but below error occurred.

image

and my package.json is like that.

image

theoephraim commented 1 month ago

it looks like you're expecting the google creds to be loaded into process.env. I assume because you added the dotenv package that they are in a .env file? You'll need to make sure you actually load the .env file, it doesn't just happen on its own. Although nodejs does have some very basic support for this... (https://dev.to/usulpro/nodejs-a-guide-to-native-env-support-and-local-development-300g)

For a much more full-featured solution, I suggest you try out http://dmno.dev This module itself uses it, you can see the config file here