James
02/04/2022, 4:33 PMENOBUFS
is thrown when the system is out of (or low on) resources like memory. Are you capping your system RAM? Or open files? https://stackoverflow.com/a/38019342 might be a good reference to see what other things you could be capping on your system.Cоlе
02/06/2022, 6:12 AMCоlе
02/06/2022, 6:12 AMCоlе
02/06/2022, 6:13 AMXan
02/06/2022, 9:01 AMWalshy | Pages
02/06/2022, 10:25 AMsimplenotezy
02/07/2022, 8:43 AMasync ({ request, next, env, waitUntil })
?HardAtWork
02/07/2022, 8:58 AMXan
02/07/2022, 4:53 PMXan
02/07/2022, 5:26 PMIsaac McFadyen | YYZ01
02/07/2022, 5:28 PMXan
02/07/2022, 5:35 PMIsaac McFadyen | YYZ01
02/07/2022, 8:31 PMIsaac McFadyen | YYZ01
02/07/2022, 8:32 PMErisa | Support Engineer
02/08/2022, 5:59 AMsimplenotezy
02/08/2022, 7:04 AMprocess.env.SOME_VAR
because I had to modify a lot of functions to accept an extra parameter (the secrets).Ap369
02/08/2022, 5:52 PMRubidot
02/09/2022, 2:51 AMhello.html
functions/[[catchall]].js
functions/[rootlevel].js
I would expect the routs to match like this:
/hello -> hello.html
/dim -> [rootlevel].js
/dim/sum -> [[catchall]].js
However, with this setup, all requests get routed to my [[catchall]].js
function, and there are no routes that lead to my other files. Is this the intended behavior? So far, I've only tried this using wrangler pages dev
.JustinNoel
02/09/2022, 7:26 AMhello.html
functions/api/
[index].js
[[nested]].js
You should catch:
/hello
: by hello.html
/api/abc
: by index.js
/api/123
: by index.js
/api/users/
: by nested.js
/api/users/123
: by nested.js
/api/comments/
: by nested.js
/api/comments/123
: by nested.js
[]
is for anything at the current directory
[[]]
is for nested stuff
https://developers.cloudflare.com/pages/platform/functions#functions-routing
P.S. You can't have an .html
file in your functions
directory.Rubidot
02/09/2022, 7:30 AMRubidot
02/09/2022, 11:44 PMhello.html
api/invisible.html
functions/api/
[index].js
[[nested]].js
In this example, api/invisible.html
is inaccessible, as all routes starting api
get served by either api/[index].js
or api/[[nested]].js
This seems like a reasonable limitation; just want to understand it correctly. I was trying to make a 404 function instead of having to use a static 404.html file, but it doesn't seem like that's possible while keeping static files available.Erwin
02/10/2022, 1:06 AMrichardcooke
02/10/2022, 11:52 AM_worker.js
format.
* When deploying the CF build automatically runs npm install
, this is an issue because we’re using PNPM and npm install
fails with an error. There seems to be no way to prevent npm install
from running. On Netlify it would be possible to pass NPM_FLAGS
where we could set —version
to avert the install, in all honestly automatically running npm install
feels a bit presumptuous. We’ve added a script on the preinstall hook that renames the package.json and replaces it with an empty one, then on postinstall puts the original back. We have to set NPM_VERSION
to 6 to because NPM 7+ runs the preinstall hook after the install 🤦♂️
* I think this has been raised before but it took me a while to figure out env.ASSETS.fetch
requires some part of the original request, passing the URL or constructing a new request won’t work like it does in wrangler.
* We're using streams to stream our app to clients, but workers have the readable stream constructor hidden behind the streams_enable_constructors
flag, there's no way to set compatibility_flags
as far as I’m aware in pages functions. This is our biggest blocker as we have to disable the streaming response.
* As far as I can see preview deploys on custom domains are not possible (correct me if I'm wrong). It would be great if we could set a custom default domain which had all of the preview deploys and was also what was published as the preview link in PR's. We’re going to look at using another worker to route requests to achieve this.
I might be missing something, if there is a better way to do any of this it would be great to hear 🙂geelen
02/10/2022, 12:29 PMGreg Brimble | Cloudflare Pages
02/10/2022, 12:38 PMGreg Brimble | Cloudflare Pages
02/10/2022, 12:38 PMDyno
02/10/2022, 12:38 PMdev.mywebsite.com
pointing to excelsior.pages.dev
would be changed to point toward dev.excelsior.pages.dev
.Erwin
02/10/2022, 12:43 PMJira Create, Bot, 8 min
NEW: PAGES-XXX : Backlog : Allow specification of Compatibility Date (glen)
richardcooke
02/10/2022, 12:50 PM