DEV Community

Discussion on: Automating My Newsletter Generation with MailChimp, Google Sheets, and AWS Lambda

 
vfulco profile image
Vincent Fulco (It / It's)

It's got to be something else. I tried a basic 'hello world' exercise from the serverless.com site and get the proper response. Both serverless.yml and handler.js are in the same dir. Similar to this repo when I git clone it. Since I have not changed the name of the function or its placement, I suspect some component of handler.js. Learning more about troubleshooting lambda quickly. To clarify, even though when we download the authentication file from google and a name is assigned, we have to rename it to g-auth.json and have it in the root dir? I have tried it in a few places.

Thread Thread
 
kylegalbraith profile image
Kyle Galbraith

Sounds like you probably didn't run npm install before running serverless deploy. This is required in order to deploy the necessary node_modules that contain the dependencies needed for the Lambda to run. I have updated this blog post to reflect that.

Thread Thread
 
vfulco profile image
Vincent Fulco (It / It's)

Thanks Kyle. I retried with the npm install and still didn't have any luck. After grubbing around google, I decided to give package.json a look and there were some babel dependencies that crept in. I have no idea how since I git cloned your repo but after doing a diff on the files and replacing with the original code, I have eliminated that error.

Now I am getting a undefined type error when it reads the 'text' column from the spreadsheet. Good crash course on node.js troubleshooting. ;-)