cloudflare / workers-aws-template

Cloudflare Workers template for accessing AWS services such as DynamoDB and SQS
Apache License 2.0
124 stars 12 forks source link

TypeError: (void 0) when trying to run example. #4

Open JakeLingwall opened 3 years ago

JakeLingwall commented 3 years ago

I've been trying to evaluate workers for an upcoming project, and I'm struggling. I used this example, replaced all the config variables, yet can't seem to get around the following error. Can't quite figure out how to get "prettified" JS to work in preview console, or to build it with non-minified. Was hoping the example would work out of the box, but wrangler generate, add the secrets (confirmed they are correct and available) leads to this error.

Uncaught (in promise) TypeError: (void 0) is not a function at worker.js:76:207404 at Array.reduce () at a (worker.js:76:207352) at Object.resolve (worker.js:76:209116) at t.resolveMiddleware (worker.js:76:251451) at t.e.send (worker.js:76:209572) at worker.js:31:35587 at worker.js:31:35653 at worker.js:31:35759 Uncaught (in response) TypeError: (void 0) is not a function

JakeLingwall commented 3 years ago

Worth noting: focused on testing the Dynamo DB example. All calls to client.send() fail with this error. I've tried copying/working with AWS documentation examples that also fail using their code.

talawahtech commented 3 years ago

@JakeLingwall I ran into this issue as well...and then it went away. I am not 100% sure what fixed, but try deleting your node_modules folder and the running npm install again. Sorry I can't be more specific/helpful.

kchudoba commented 3 years ago

@JakeLingwall did you manage to get it to work? I think I have the same issue.