The summary already says it, but you can't build Koha's dependencies on aarch64 because it breaks on node-sass which has native bindings that demand x86_64. Therefore we should switch to sass (aka dart-sass) which doesn't have this problem . For a possible migration path, see https://dev.to/ccreusat/migrating-from-node-sass-to-sass-dart-sass-with-npm-3g3c
Created attachment 146729 [details] [review] Bug 32978: 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass This patch adds replaces node-sass with dart-sass, updating our gulpfile accordingly. Some corrections have been made to SCSS to fix warnings raised during the build process.
I'm not sure if this is really ready to go, but I wanted to share what I'd done so far.
I should add that I only tested from inside KTD on an Intel Mac.
Created attachment 146744 [details] [review] Bug 32978: 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass This patch adds replaces node-sass with dart-sass, updating our gulpfile accordingly. Some corrections have been made to SCSS to fix warnings raised during the build process. Works like a charm. Great work oleonard! Tested on Apple M1, e.g. aarch64. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Created attachment 146745 [details] [review] Bug 32978: 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass This patch adds replaces node-sass with dart-sass, updating our gulpfile accordingly. Some corrections have been made to SCSS to fix warnings raised during the build process. Works like a charm. Great work oleonard! Tested on Apple M1, e.g. aarch64. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Working well in ktd on my linux box. I ran a `yarn install --frozen-lockfile` to get the local dependancies installed and used over the ktd defaults. It spits out a couple of errors: warning " > bootstrap@4.6.2" has unmet peer dependency "jquery@1.9.1 - 3". and warning " > bootstrap@4.6.2" has unmet peer dependency "popper.js@^1.16.1". I think these are harmless.. I certailny couldn't spot any problems in running Koha. QA scripts are also happy and running the builds outside of ktd also works (assuming you've got the right node versions pinned at 14) I'm going to tentatively PQA here.. though more eyes are certainly welcome.
RM should generate the yarn.lock, I am getting changes when I run it locally. (In reply to Martin Renvoize from comment #6) > It spits out a couple of errors: > > warning " > bootstrap@4.6.2" has unmet peer dependency "jquery@1.9.1 - 3". > and > warning " > bootstrap@4.6.2" has unmet peer dependency "popper.js@^1.16.1". This is on master as well.
And, just saying... but "Bug 32978: 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass" is not a valid commit message. This is the description of the bug, not what the patch is actually doing.
Created attachment 147136 [details] [review] Bug 32978: Replace node-sass with dart-sass 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass. This patch addresses this by replacing node-sass with dart-sass, updating our gulpfile accordingly. Some corrections have been made to SCSS to fix warnings raised during the build process. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Works like a charm. Great work oleonard! Tested on Apple M1, e.g. aarch64. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: I removed some useless formatting changes in the gulpfile, and the yarn.lock changes as well.
Created attachment 147137 [details] [review] Bug 32978: Replace node-sass with dart-sass 'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass. This patch addresses this by replacing node-sass with dart-sass, updating our gulpfile accordingly. Some corrections have been made to SCSS to fix warnings raised during the build process. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Works like a charm. Great work oleonard! Tested on Apple M1, e.g. aarch64. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: I removed some useless formatting changes in the gulpfile, and the yarn.lock changes as well.
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.