building zotero 5 for ARM (raspberry)
I have been trying to build zotero 5 for the raspberry pi 4, using the instructions at https://www.zotero.org/support/dev/client_coding/Building_the_standalone_client. I have successfully cloned the Zotero source code in the first step, I have updated my installation of Node.js to node-v12.13.1-linux-armv7l. When following step 2, I cd to the zotero-client directory and run npm i, I get the following:
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
audited 6720 packages in 41.267s
found 2 vulnerabilities (1 low, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
That line about skipping an optional dependency seems to say that I can't compile for the arm platform. Is that true? Is there a way to work around this?
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
audited 6720 packages in 41.267s
found 2 vulnerabilities (1 low, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
That line about skipping an optional dependency seems to say that I can't compile for the arm platform. Is that true? Is there a way to work around this?
npm run build
I get the following fatal error:
zotero@5.0.0 build /home/pi/zotero-client
> node ./scripts/build.js
/home/pi/zotero-client/node_modules/node-sass/lib/binding.js:13
throw new Error(errors.unsupportedEnvironment());
^
Error: Node Sass does not yet support your current environment: Linux Unsupported architecture (arm) with Node.js 12.x
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.13.0
at module.exports (/home/pi/zotero-client/node_modules/node-sass/lib/binding.js:13:13)
at Object. (/home/pi/zotero-client/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/pi/zotero-client/scripts/sass.js:4:14)
at Module._compile (internal/modules/cjs/loader.js:959:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zotero@5.0.0 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zotero@5.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-08T21_16_10_429Z-debug.log
ahead with the next few steps. All of them ran normally. But the standalone binary was in the staging/Zotero_linux-x86_64 directory, which suggests that it was built for intel rather than for ARM, and indeed when i try to run it with staging/Zotero_linux-x86_64/zotero I get "no such file or directory"