Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD install instructions out of date #277

Open
psa opened this issue Jun 24, 2024 · 8 comments
Open

FreeBSD install instructions out of date #277

psa opened this issue Jun 24, 2024 · 8 comments

Comments

@psa
Copy link

psa commented Jun 24, 2024

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:

export PUPPETEER_SKIP_DOWNLOAD=1
export CYPRESS_INSTALL_BINARY=0

pkg install -y sentry-cli

Remove sentry/cli from pnpm-lock.yaml (we've installed it above)

Add to package.json:

"resolutions": {
    "rollup": "npm:@rollup/wasm-node"
  },

Build frontend:

cd frontend
pnpm install
pnpm run build

Build backend:

cd ..
mage build

Vikunja Version

HEAD

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

@kolaente
Copy link
Member

The changes to package.json should not be necessary. What error message did you get?

@psa
Copy link
Author

psa commented Jun 25, 2024

Rollup doesn't have a FreeBSD build and their error recommends the WASM build.

pnpm run build

> [email protected] build /usr/home/psa/code/vikunja/frontend
> vite build && workbox copyLibraries dist/

/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/[email protected]/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/[email protected]/node_modules/rollup/dist/native.js:84:8)
    at getPackageBase (/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js:75:3)
    at Object.<anonymous> (/usr/home/psa/code/vikunja/frontend/node_modules/.pnpm/[email protected]/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.

@dpschen
Copy link
Contributor

dpschen commented Jun 27, 2024

You might need to use pnpm overwrites to resolve rollup to @rollup/wasm-node. See this issue.

@kolaente
Copy link
Member

@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?

@dpschen
Copy link
Contributor

dpschen commented Jul 1, 2024

@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.

@psa
Copy link
Author

psa commented Jul 5, 2024

@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.

@psa
Copy link
Author

psa commented Jul 5, 2024

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

@dpschen
Copy link
Contributor

dpschen commented Jul 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants