IanVS
IanVS
CDCloudflare Developers
Created by IanVS on 9/25/2023 in #pages-help
wrangler pages dev when functions are not in root?
I keep my pages functions in a subfolder of my application, not at the top-level, but that causes problems when calling npx wrangler pages dev. I can't point it to that folder, or else the app does not start correctly (I get 404's), and I can't use npx wrangler pages dev -- <COMMAND> or else my functions are not found. Is there any way to support this structure?
4 replies
CDCloudflare Developers
Created by IanVS on 1/13/2023 in #pages-help
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.
4 replies