wonkrattle
12/03/2021, 3:20 AMEpailes
12/03/2021, 12:00 PMgeelen
12/03/2021, 1:09 PMgeelen
12/03/2021, 1:10 PMgeelen
12/03/2021, 1:12 PMSkye
12/03/2021, 1:25 PMgeelen
12/03/2021, 1:32 PMgeelen
12/03/2021, 1:33 PMSkye
12/03/2021, 1:33 PMgeelen
12/03/2021, 1:33 PMSkye
12/03/2021, 1:34 PMEpailes
12/03/2021, 4:35 PMjacobmarble
12/03/2021, 6:02 PMwrangler pages dev
working. It is a little unclear how the /functions
directory is discovered. Appears to be simply $PWD/functions
, is that correct?Greg Brimble | Cloudflare Pages
12/03/2021, 6:02 PMjacobmarble
12/03/2021, 6:04 PMpackage.json
?Greg Brimble | Cloudflare Pages
12/03/2021, 6:05 PMGreg Brimble | Cloudflare Pages
12/03/2021, 6:05 PM./functions
, under the assumption it's being run from the root of the git project.jacobmarble
12/03/2021, 6:06 PM$PWD/functions
was my way of saying the same thing, I believe.Greg Brimble | Cloudflare Pages
12/03/2021, 6:07 PMjacobmarble
12/03/2021, 6:12 PMwrangler pages dev
explicitly asks for the location of static assets (the same requirement exists in prod; I get it) and explicitly states that the script path defaults to _worker.js
but does not state where (or if) it will look for /functions
.jacobmarble
12/03/2021, 6:12 PMnpx wrangler@beta pages dev ./public --script-path ./doesnotexist
then /functions
still works. Maybe --script-path
should inform the discovery of /functions
and default to /functions
?jacobmarble
12/03/2021, 6:13 PMGreg Brimble | Cloudflare Pages
12/03/2021, 6:27 PM--script-path
exists for people who are using the proxy command thing. We'd still need to know where the _worker.js
file is, so this is an escape hatch for that, essentially.Greg Brimble | Cloudflare Pages
12/03/2021, 6:28 PMjacobmarble
12/03/2021, 10:38 PMwrangler pages dev
to fix a problem on my side. Now the site succeeds with wrangler pages dev
, but the preview deployment continues to fail with Failed: an internal error occurred
. What's my next step?jacobmarble
12/03/2021, 10:39 PMsquare
npm module, which requires nodejs shims. If I knew more about the error, I could decide whether it's worth switching payment processor to Stripe.jacobmarble
12/03/2021, 11:19 PMsquare
npm module depends on apimatic/core
for its HttpClient
, which depends on axios
, which isn't switching to the Fetch API any time soon. My guess is that is causing this "internal error" in the Pages deployment.jacobmarble
12/03/2021, 11:21 PMaxios
is a dealbreaker for Cloudflare Pages/Workers, then I'll open an issue with Square.James
12/03/2021, 11:30 PMaxios
definitely won't work on Workers. You'll need something that uses fetch
under the hood.jacobmarble
12/03/2021, 11:30 PM