You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
druid-console module can't be built on Mac M1 during installation of Node saying error=86, Bad CPU type in executable
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:npm (npm-install) on project druid-console: Failed to run task: 'npm ci' failed. java.io.IOException: Cannot run program "/Users/frankchen/source/open/druid/web-console/target/node/node" (in directory "/Users/frankchen/source/open/druid/web-console"): error=86, Bad CPU type in executable -> [Help 1]
This is because node 14.19.3 does not ship any release for Mac M1 chip, it installs x86 version on Mac M1.
[INFO] Installing node version v14.19.3
[INFO] Unpacking /Users/frankchen/.m2/repository/com/github/eirslett/node/14.19.3/node-14.19.3-darwin-x64.tar.gz into /Users/frankchen/source/open/druid/web-console/target/node/tmp
[INFO] Copying node binary from /Users/frankchen/source/open/druid/web-console/target/node/tmp/node-v14.19.3-darwin-x64/bin/node to /Users/frankchen/source/open/druid/web-console/target/node/node
[INFO] Installed node locally.
The Node 16.x (another LTS) contains release for Mac M1, see: https://nodejs.org/dist/v16.17.0/
But if we upgrade the node to such version, existing node-sass has also needed to be upgraded from 5.x to at least 6.x because node-sass 5.x fails to build on Node 16. Only node-sass 6.0+ support Node 16.
So, the upgrade becomes complicated, I don't if there any other modules incompatible with Node 16. It's out of ability to do that. So I have to install Rosetta on my Mac M1 to run x86 version of Node 14.
@vogievetsky Do you have any plan to upgrade Node to higher LTS version such as Node 16 so that druid-console can be built directly on Mac M1? If not, I will open a PR to update the dev-doc to let users know how to tackle the above problem that I encounter.
The text was updated successfully, but these errors were encountered:
yes, I really want to upgrade to Node 16. The only issue IIRC is something with node-sass as you mentioned which is why we stuck with 14 (when we last looked at it node-sass 6 was not out yet). Is upgrading to node-sass 6 trivial?
I update to the lastest master, and tried to build again, the node-sass still fails to compile. Finally I found the the Mac M1 is still not supported by node-sass(sass/node-sass#3033)
There're some other solution on the internet to suggest using sass to replace node-sass, but since there's sass-loader which is dependent on node-sass, the replacing is still not possible at my local environment.
So, at last, I'm still using rosetta to use x64 version of node and node-sass on my Mac M1.
druid-console module can't be built on Mac M1 during installation of Node saying
error=86, Bad CPU type in executable
This is because node 14.19.3 does not ship any release for Mac M1 chip, it installs x86 version on Mac M1.
The Node 16.x (another LTS) contains release for Mac M1, see: https://nodejs.org/dist/v16.17.0/
But if we upgrade the node to such version, existing node-sass has also needed to be upgraded from 5.x to at least 6.x because node-sass 5.x fails to build on Node 16. Only node-sass 6.0+ support Node 16.
So, the upgrade becomes complicated, I don't if there any other modules incompatible with Node 16. It's out of ability to do that. So I have to install
Rosetta
on my Mac M1 to run x86 version of Node 14.@vogievetsky Do you have any plan to upgrade Node to higher LTS version such as Node 16 so that druid-console can be built directly on Mac M1? If not, I will open a PR to update the dev-doc to let users know how to tackle the above problem that I encounter.
The text was updated successfully, but these errors were encountered: