FrankChen021 opened a new issue, #13012:
URL: https://github.com/apache/druid/issues/13012

   druid-console module can't be built on Mac M1 during installation of Node 
saying `error=86, Bad CPU type in executable`
   
   ```text
   [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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to