aerospike-client-nodejs icon indicating copy to clipboard operation
aerospike-client-nodejs copied to clipboard

npm install aerospike does not work with Apple M1 chip

Open dheerajtiwari opened this issue 3 years ago • 5 comments

npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux,darwin,win32","arch":"x64"} (current: {"os":"darwin","arch":"arm64"}) npm ERR! notsup Valid OS: linux,darwin,win32 npm ERR! notsup Valid Arch: x64 npm ERR! notsup Actual OS: darwin npm ERR! notsup Actual Arch: arm64

dheerajtiwari avatar Aug 06 '21 07:08 dheerajtiwari

Thanks for reporting the issue. Unfortunately, I don't have a new M1-based mac yet to replicate this. :-)

In order for the Node.js client to support the arm64 platform, we'll first need a build of the Aerospike C client SDK for that platform, since the Node.js client is just a wrapper around the C client. I'll have to check with the Aerospike team what's the plan for that.

jhecking avatar Aug 06 '21 08:08 jhecking

At the moment there are no concrete plans yet to support the Aerospike C client on arm64.

jhecking avatar Aug 07 '21 11:08 jhecking

as a workaround you can install aerospike-client-nodejs inside of Docker, and run it from there. Just don't forget to specify platform: amd64 when you start it. Example of my docker-compose.yaml file

version: '2.4'
services:
  eventproclambda:
    build: .
    platform: linux/amd64

and Dockerfile stays normal

FROM node:14.18.2

WORKDIR /usr/src/app

COPY package*.json ./

RUN ["npm", "--verbose" ,  "ci"]

COPY . .
ENTRYPOINT [ "npm", "test" ]

eagleeye avatar Mar 08 '22 10:03 eagleeye

Quick update: There has been some progress on getting the Aerospike C client to work on Apple Silicon - ref. https://github.com/aerospike/aerospike-client-c/pull/120.

jhecking avatar Mar 09 '22 04:03 jhecking

For the server, and in general running amd64 containers on M1 processors see aerospike-community/docker-amd64-mac-m1.

Otherwise, native ARM support will come to the C, Node.js and Python clients later this year.

rbotzer avatar Jun 04 '22 00:06 rbotzer

Native arm support was added in Client version 5.2.0. Apple M1 chips should work now. Closing issue now.

DomPeliniAerospike avatar Jan 25 '23 01:01 DomPeliniAerospike