Wrangler fails with only `Command failed`

I am attempting to run wrangler in AWS Lambda, via a call to exec(), but it's failing and not giving any stderr or stdout. This is what I am getting:
ERROR Problem running wrangler: Error: Command failed: node /var/task/node_modules/wrangler/bin/wrangler.js pages publish build --project-name="webclient-gamma" --branch="main" --commit-hash="a4e01401e3703b10c6ac35f0225af2411f422c8f" --commit-message="Don't cancel deploy preview workflows, only checks. (#1215)" --commit-dirty=true

INFO stdout:

ERROR stderr:
ERROR Problem running wrangler: Error: Command failed: node /var/task/node_modules/wrangler/bin/wrangler.js pages publish build --project-name="webclient-gamma" --branch="main" --commit-hash="a4e01401e3703b10c6ac35f0225af2411f422c8f" --commit-message="Don't cancel deploy preview workflows, only checks. (#1215)" --commit-dirty=true

INFO stdout:

ERROR stderr:
Any ideas what could cause this? I'm not having any trouble when I run it locally, only in the Lambda.
1 Reply
IanVS
IanVS2y ago
I have to give it an absolute path because I need to run it from /tmp, which is where my build files are, so that it will pick up my functions. The bucket is read-only (aside from the /tmp dir), does that cause problems? Does wrangler try to write anything to the filesystem? OK, this seems to happen when I install wrangler on my mac and then push it up. If I install with linux and push from there, it works.
Want results from more Discord servers?
Add your server