Lychee
Lychee copied to clipboard
No longer able to update on FreeBSD 14
Detailed description of the problem
I run lychee on a x86_64 server running freeBSD 14. I wanted to update today after not having done so for many months. Now the update requires node, and the node build fails with this error:
> npm run build
> build
> vite build
/usr/local/www/Lychee-Laravel/node_modules/rollup/dist/native.js:38
throw new Error(
^
Error: Your current platform "freebsd" and architecture "x64" combination is not yet supported by the native Rollup build. Please use the WASM build "@rollup/wasm-node" instead.
The following platform-architecture combinations are supported:
android-arm
android-arm64
darwin-arm64
darwin-x64
linux-arm
linux-arm64
linux-arm64 (musl)
linux-riscv64
linux-x64
linux-x64 (musl)
win32-arm64
win32-ia32
win32-x64
If this is important to you, please consider supporting Rollup to make a native build for your platform and architecture available.
at Object.<anonymous> (/usr/local/www/Lychee-Laravel/node_modules/rollup/dist/native.js:38:8)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at cjsLoader (node:internal/modules/esm/translators:345:17)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
Node.js v20.10.0
Apparently this can be avoided by changing the build rollup to the mentioned @rollup/wasm-node, idk what that involves tho.
As a "temporary" solution, you can also download the build artifact.
e.g. from the last build: https://github.com/LycheeOrg/Lychee/actions/runs/7728780231 (look at the bottom of the page) and get the public/build files from it.
This is weird. I've been on freebsd 14 since it was released. No problems updating yet. Can I be of any help?
Hi @oblomow, thank you for your help.
This is weird. I've been on freebsd 14 since it was released. No problems updating yet. Can I be of any help?
What kind of update are you doing ? via git pull + recompilation of front-end via npm or download zip release?
I indeed do a git pull. The recompilation via npm is automatically started ( from what I see and comprehend of the logs).
ah. when I do a ' npm run build' by hand I get:
sudo -u www npm run build
> build
> vite build
vite v4.5.1 building for production...
transforming (117) node_modules/justified-layout/lib/row.jsUnable to resolve `@import "@fortawesome/fontawesome-free/css/all.css"` from /vol/www/data/albums/resources/css
✓ 120 modules transformed.
✓ built in 5.19s
[vite:css] [postcss] ENOENT: no such file or directory, open '@fortawesome/fontawesome-free/css/all.css'
file: /vol/www/data/albums/resources/css/app.css:undefined:undefined
error during build:
Error: [postcss] ENOENT: no such file or directory, open '@fortawesome/fontawesome-free/css/all.css'
npm notice
npm notice New minor version of npm available! 10.2.5 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g [email protected] to update!
npm notice
When I do : npm install @fortawesome/fontawesome-free and then npm run build, I can reproduce the error of @yourfate
This seems to be a vite issue rather than a Lychee issue. I will be closing this.
For people in the FreeBDS world, consider the following links:
- https://github.com/vitejs/vite/issues/15122
- https://laracasts.com/discuss/channels/laravel/i-keep-hiting-and-error-with-vite-not-being-supported-on-freebsd
- https://ankitbarla.in/blog/how-to-build-your-vite-project-on-freebsd/