package: mongo-memory-server
Would it be possible for MongoMemoryServer to handle the Apple M1 / arm64 architecture without additional configuration. It seems likely that anyone using arm64 will require the x64 mongod binary until there is a arm64 one available.
Trying to run tests with MongoMemoryServer on Apple M1 / arm64 resulted in the following error:
unsupported architecture, ia32 and x64 are the only valid options
I was able to resolve the issue using the MONGOMS_ARCH environment variable
env MONGOMS_ARCH=x64 npn run test
Thanks for creating a fantastic library!
currently we check only for these 2 supported architectures, because mongodb dosnt provide many arm(64) packages (at least when i last viewed)
@maxpeterson my problem doesn't solve with env MONGOMS_ARCH=x64 npn run test?
how do you solve the problem exactly?
@maxpeterson my problem doesn't solve with
env MONGOMS_ARCH=x64 npn run test?
how do you solve the problem exactly?
@amirjani What if you try the MONGOMS_DOWNLOAD_URL env vars outlined in https://github.com/nodkz/mongodb-memory-server#configuring-which-mongod-binary-to-use - pointed to an x64 / ios path.
If that fails you could try manually downloading the binary and copying it to the node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.14/mongod
@maxpeterson my problem doesn't solve with
env MONGOMS_ARCH=x64 npn run test?
how do you solve the problem exactly?@amirjani What if you try the
MONGOMS_DOWNLOAD_URLenv vars outlined in https://github.com/nodkz/mongodb-memory-server#configuring-which-mongod-binary-to-use - pointed to an x64 / ios path.If that fails you could try manually downloading the binary and copying it to the
node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.14/mongod
Thanks for your help
we could fix this with below too:
"config": {
"mongodbMemoryServer": {
"systemBinary": "/opt/homebrew/bin/mongod",
"arch": "x64",
"disablePostinstall": "1",
"version": "4.4.2", // whatever version you want
"debug": "0"
}
}
Hey, just wanted to say thank you.
The workaround with env MONGOMS_ARCH=x64 works on our MacMini M1 CI server as well as on MBP 13 M1.
It downloads x64 mongo and runs it via Rosetta 2. Great fix until SpiderMonkey produces ARM version and Mongo updates it.
Hi
What about arm64 for ubuntu 20.04, it looks like mongodb provide a binary for that: https://docs.mongodb.com/manual/administration/production-notes/#arm64
@JStonevalley thanks, #443
this issue here is about mac arm64, so i created one to track your suggestion
@JStonevalley thanks, #443
this issue here is about mac arm64, so i created one to track your suggestion
Thank you!
this should be automatically translated in 7.0.0-beta.22, could someone test?
this should be automatically translated in
7.0.0-beta.22, could someone test?
I have tested 7.0.0-beta.22 on Apple M1 / arm64 and the correct mongod binary is downloaded during npm install 馃槃
node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.20/mongod --version
db version v4.0.20
git version: e2416422da84a0b63cde2397d60b521758b56d1b
allocator: system
modules: none
build environment:
distarch: x86_64
After some minor compatibility tweaks (from version 6.9.2) my test pass.
thanks for testing @maxpeterson
closing because fixed in 7.0.0-beta.22
Most helpful comment
Hey, just wanted to say thank you.
The workaround with
env MONGOMS_ARCH=x64works on our MacMini M1 CI server as well as on MBP 13 M1.It downloads x64 mongo and runs it via Rosetta 2. Great fix until SpiderMonkey produces ARM version and Mongo updates it.