Open psa opened 3 months ago
The changes to package.json should not be necessary. What error message did you get?
Rollup doesn't have a FreeBSD build and their error recommends the WASM build.
pnpm run build
> vikunja-frontend@0.10.0 build /usr/home/psa/code/vikunja/frontend
> vite build && workbox copyLibraries dist/
/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/rollup@4.18.0/node_modules/rollup/dist/native.js:84
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-arm (musl)
linux-arm64
linux-arm64 (musl)
linux-ppc64
linux-riscv64
linux-s390x
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 throwUnsupportedError (/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/rollup@4.18.0/node_modules/rollup/dist/native.js:84:8)
at getPackageBase (/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/rollup@4.18.0/node_modules/rollup/dist/native.js:75:3)
at Object.<anonymous> (/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/rollup@4.18.0/node_modules/rollup/dist/native.js:37:21)
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:356:17)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:305:7)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
Node.js v20.11.1
ELIFECYCLE Command failed with exit code 1.
You might need to use pnpm overwrites to resolve rollup to @rollup/wasm-node. See this issue.
@dpschen Is that something you'd need to configure every time when building on FreeBSD? Or something we could add into Vikunja's package.json in general?
@psa sry I just realised that I totally over-read that you already wrote the pnpm overwrites solution…
Can you specify further what you mean by "Remove sentry/cli from pnpm-lock.yaml (we've installed it above)"? Remove it from vite-plugin-sentry as a dependency?
I got this, but I am not sure if it works for all os:
"resolutions": {
"rollup": {
"freebsd": "npm:@rollup/wasm-node"
}
},
Regarding @sentry/cli: it doesn't seem to be possible not to install a dependency only on a specific os, without affecting others.
@dpschen Yes, I stripped sentry/cli
from the dependency list so that the installer wouldn't try installing it. In order to satisfy the dependency I installed it locally on the machine using pkg install sentry-cli
.
Unfortunately, node really isn't my specialty and I'm not sure how one would go about putting in exceptions like that.
I got this, but I am not sure if it works for all os:
"resolutions": { "rollup": { "freebsd": "npm:@rollup/wasm-node" } },
This causes the following error:
pnpm install
ERROR override.newPref.startsWith is not a function
pnpm: override.newPref.startsWith is not a function
at createLocalTarget (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:188994:28)
at /usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:188973:24
at Array.map (<anonymous>)
at createVersionsOverrider (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:188970:138)
at createReadPackageHook (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:189066:74)
at extendOptions (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:189233:90)
at mutateModules (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:189754:61)
at install (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:189711:51)
at installDeps (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:191812:56)
at async /usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:220636:21
Thanks for trying!
Unsure, but maybe this pr makes sentry-cli. I replaced the sentry vite plugin with the (now existing) official plugin. The PR is still wip, so will probably not work right now.
At least until then building on freebsd will be a manual step, as you described.
Here's the diff on the changes, if that's easier to visualise: https://github.com/go-vikunja/vikunja/commit/0972c1b53442365427af7340512dad39ecb0c231
Description
Couldn't find the repo containing https://vikunja.io/docs/installing/#freebsd--freenas so I'm noting it here.
The FreeBSD install docs need some updates to work around linux only binary installs.
Adjustments I needed to make:
Disable Linux only binary installs:
Remove sentry\/cli from pnpm-lock.yaml (we've installed it above)
Add to package.json:
Build frontend:
Build backend:
Vikunja Version
HEAD
Browser and version
No response
Can you reproduce the bug on the Vikunja demo site?
Yes
Screenshots
No response