pnpm run preview deletes images and runs into type error #1430
Labels
No labels
404
backport/v1.19
backport/v1.20
backport/v1.21
backport/v10.0
backport/v11.0
backport/v12.0
backport/v13.0
backport/v14.0
backport/v7.0
backport/v8.0
backport/v9.0
good first issue
meta
new docs
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/docs#1430
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm working with a freshly cloned repo, using Node version 24.4.1 and I
followed the "Getting set up" section in the readme. OS is Kubuntu 24.04 with kernel version 6.8.0-79-generic.
First run of
pnpm run previewsomehow deletes two svg images from the repository:Restoring the images while the preview server runs solves this and the next error pops up:
Edit: I completely removed node and anything related and then reinstalled and retried with node 20 but the errors persist.
Edit: This is the output of a CORE_PACK_ENABLE_STRICT=0 pnpm run preview:
I can’t reproduce 🤔 Neither with node v24.4.1 nor with 24.7.0.
Hmm maybe its on my side.
Can you help me with the exact steps to build the docs/website?
I should mention, that I encounter the same behaviour when trying to build the website.
I happen to have recent installation of opensuse leap v15.6, I installed pnpm v10.15.1 and NodeJS v20.19.2. Cloned the docs repository and then ran
COREPACK_ENABLE_STRICT=0 pnpm run preview. I first got the "no stable release" error, but refreshing that page and I got the rendered documentation.Not sure how much this helps, you could try removing the pnpm store via https://pnpm.io/uninstall#removing-the-global-content-addressable-store and run
pnpm installagain.Alright, so I tried the following:
But i'm still running into the same error. I feel like i'm missing something. I updated the issue description with the output of COREPACK_ENABLE_STRICT=0 pnpm run preview after doing all the steps
One thing i noticed:
Outside of the docs folder
pnpm -vresults in 10.15.1 while inside the docs folder 9.1.2 is given as pnpm version.Which is configured in the package.json of course
"packageManager": "pnpm@9.1.2+sha512.127dc83b9ea10c32be65d22a8efb4a65fb952e8fefbdfded39bdc3c97efc32d31b48b00420df2c1187ace28c921c902f0cb5a134a4d032b8b5295cbfa2c681e2"Partial Success: On another retry I finally got the docs to display.
However on running
COREPACK_ENABLE_STRICT=0 pnpm run previewthe above mentioned images still get deleted.Things different in this trial:
pnpm approve-buildsto build puppeteerCOREPACK_ENABLE_STRICT=0 pnpm run previewAfter this I reverted to pnpm 9.1.2, deleted local node_modules and ~/.local/share/pnpm and tried the whole process again with the same outcome.
So now to find out, why the images get deleted.
Alright, the deleted images turn out to be a side effect of another problem:
Ubuntu 24 restricts chrome with an app armor profile. There is a workaround which involves editing the app-armor profile. The current way of mermaid image generation involves deleting and re-generating svgs. So if the process of generation fails, the images will be missing of course. I'll look into that and update here.
Note: puppetteer auto-downloads an up to date version of chrome. This will be blocked by ubuntu app-armor.
Okay, solved:
npx @puppeteer/browsers install chrome@stablein my $HOMEPUPPETEER_EXECUTABLE_PATH="path/to/downloaded/chrome/executable" PUPETEER_SKIP_CHROMIUM_DOWNLOAD="true" COREPACK_ENABLE_STRICT=0 pnpm run previewforgejo/docs#1454 was merged, I think this can be closed?