Installing packages to a Cloudflare Pages enviornment
I'm setting up and Tauri and Svelte website on Cloudflare pages and I've run into a issue installing packages using
apt
as a root user. I'm getting The "no new privileges" flag is set, which prevents sudo from running as root.
. Does Cloudflare Pages allow me installing packages like this?18 Replies
You cant install packages with apt in Pages build system, you don't have root access
Would you happen to know an alternative for installing these packages?
I frequently also use Github Workflows and with that I'm able to use root and install packages, I know they're not the same though.
Most of them should exist already but not all, do you get errors without those?
I do
But like, no I don't really think there is a way.. you can always use a GitHub Action to deploy instead if Pages build system isn't working for your usecase
So I would build in Github Actions and then Cloudflare Pages would deploy that?
GitHub
GitHub - cloudflare/pages-action
Contribute to cloudflare/pages-action development by creating an account on GitHub.
right, I think I've used that before actually
Thanks for your help
I've seen plenty of projects have success with it and the experience is not bad at all if youre already familiar with github actions
the handling of branch aliases all just works automaticallly same as Pages builds
if you dont specify
branch
anyway (then it infers from the current checkout)I've already had a whole ordeal trying to get my build command on Cloudflare Pages to work, look how long it is now,
thanks
pnpm should already be installed, not sure about rust
ah I think the issue was the pnpm version was too outdated
you can set
PNPM_VERSION
to change itgood to know
Cloudflare Docs
Language support and tools · Cloudflare Pages docs
Cloudflare Pages’ build environment has broad support for a variety of languages, such as Ruby, Node.js, Python, PHP, and Go.
I'm having a little trouble with the output directory,
here's the workflow, https://github.com/LimesKey/PoolMilton/blob/main/.github/workflows/main.yml