garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
1.72k stars 50 forks source link

Does not build on FreeBSD: Cannot find module './artifacts/index.freebsd-x64.node' #542

Closed yonas closed 1 week ago

yonas commented 3 weeks ago
$ yarn install && yarn build
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
⠁ (node:74311) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
success Already up-to-date.
Done in 0.88s.
yarn run v1.22.19
$ cross-env UI_OS=unix parcel build src/index.html --public-url ./
Error: Cannot find module './artifacts/index.freebsd-x64.node'
Require stack:
- /home/yonas/git/backrest/webui/node_modules/@parcel/source-map/parcel_sourcemap_node/index.js
- /home/yonas/git/backrest/webui/node_modules/@parcel/source-map/dist/node.js
- /home/yonas/git/backrest/webui/node_modules/@parcel/utils/lib/index.js
- /home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/public/Bundle.js
- /home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/Parcel.js
- /home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/index.js
- /home/yonas/git/backrest/webui/node_modules/parcel/lib/cli.js
- /home/yonas/git/backrest/webui/node_modules/parcel/lib/bin.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1246:15)
    at Function._load (node:internal/modules/cjs/loader:1072:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:216:24)
    at Module.require (node:internal/modules/cjs/loader:1337:12)
    at require (node:internal/modules/helpers:139:16)
    at Object.<anonymous> (/home/yonas/git/backrest/webui/node_modules/@parcel/source-map/parcel_sourcemap_node/index.js:15:18)
    at Module._compile (node:internal/modules/cjs/loader:1572:14)
    at Object..js (node:internal/modules/cjs/loader:1709:10)
    at Module.load (node:internal/modules/cjs/loader:1315:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/yonas/git/backrest/webui/node_modules/@parcel/source-map/parcel_sourcemap_node/index.js',
    '/home/yonas/git/backrest/webui/node_modules/@parcel/source-map/dist/node.js',
    '/home/yonas/git/backrest/webui/node_modules/@parcel/utils/lib/index.js',
    '/home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/public/Bundle.js',
    '/home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/Parcel.js',
    '/home/yonas/git/backrest/webui/node_modules/@parcel/core/lib/index.js',
    '/home/yonas/git/backrest/webui/node_modules/parcel/lib/cli.js',
    '/home/yonas/git/backrest/webui/node_modules/parcel/lib/bin.js'
  ]
}

FreeBSD 14 node v23.1.0 commit b7abbf9

garethgeorge commented 2 weeks ago

Hey -- the development setup is not validated on FreeBSD. The published FreeBSD builds are cross compiled on a linux worker on github actions.

Specifically looks like its the parcel dependency for the webui which is the packager I use (very much required dependency) -- I'd probably recommend cross building either in docker or using a VM for FreeBSD if it isn't supported.