Repository navigation
Description
We currently have a frustrating series of roadblocks for developers on M1/silicon devices that require them to perform several workarounds such as downgrading Node to v14 and running Terminal in Rosetta mode in order to work on EUI.
The primary culprit of these issues is node-sass (sass/node-sass#3033). There have also been several reports of nodegit being an issue, which I intend to investigate after node-sass has been removed.
Steps required to move EUI off of node-sass:
- Replacing Sass dependencies that depend on
node-sass:-
sass-extract(Removesass-extractdependency #6443)- My preferred approach would be to stop extracting dynamic variables from Sass totally. Since Sass is essentially in deprecation mode and we are no longer adding new Sass variables whatsoever, there should be no downside to simply statically comitting our
.jsonand.json.d.tsfiles to source control until we figure out how to transition Kibana over smoothly.
- My preferred approach would be to stop extracting dynamic variables from Sass totally. Since Sass is essentially in deprecation mode and we are no longer adding new Sass variables whatsoever, there should be no downside to simply statically comitting our
-
sass-vars-to-js-loader(Removesass-vars-to-js-loaderdependency #6444)- This would be an easy fix ([Docs] Add ThemeLanguages and new Breakpoints page #5227 did a lot of the heavy lifting already) except for the fact that our source-exported EUI charts theme relies on extracting Sass vars. I'm investigating a JS only workaround/solution.
-
sass-lintandsass-lint-auto-fix(Replacesass-lintdependency withstylelint#6470)- We should look into replacing this with
stylelint(assass-lintis deprecated in any case), which additionally supports linting CSS-in-JS
- We should look into replacing this with
-
- Replacing
node-sasswithsass(aka dart-sass) (Removenode-sassin favor of dartsass#6474)- If performance is a major issue for dart-sass, we can consider the following alternatives:
- Using sass-embedded
- Trying what Kibana does and installing
node-sassfrom a prebuilt version that they host, that supports arm64
- If performance is a major issue for dart-sass, we can consider the following alternatives:
Steps required to move EUI off of nodegit:
nodegit currently has multiple alpha releases, the latest of which appear to address ARM64 issues: https://github.com/nodegit/nodegit/blob/master/CHANGELOG.md
We should try upgrading to the latest alpha release to see if that resolves arm64 errors. If not, we can alternatively consider:
- using
execinstead to call git CLI commands - using bash scripts instead of node.js
Activity
cee-chen commentedon Dec 13, 2022
As far as I've heard confirmation from the folks on the team who are on M1 machines, this should now be resolved. Please feel free to leave a comment or re-open this issue if that's not the case!