mongodb-js / mongodb-prebuilt

Install MongoDB prebuilt package using npm https://npmjs.org/package/mongodb-prebuilt
ISC License
56 stars 50 forks source link

Error: unsupported architecture, ia32 and x64 are the only valid options #71

Open AlonMiz opened 2 years ago

AlonMiz commented 2 years ago

happened while using mock-mongoose. failed on installing mongodb on Apple M1 is ARM-based chip

Error: unsupported architecture, ia32 and x64 are the only valid options
    at MongoDBPlatform.translateArch (node_modules/.pnpm/mongodb-download@2.2.7/node_modules/mongodb-download/built/mongodb-download.js:626:19)
    at new MongoDBPlatform (/node_modules/.pnpm/mongodb-download@2.2.7/node_modules/mongodb-download/built/mongodb-download.js:429:26)
    at new MongoDBDownload (/node_modules/.pnpm/mongodb-download@2.2.7/node_modules/mongodb-download/built/mongodb-download.js:27:32)
    at new MongoDBPrebuilt (/node_modules/.pnpm/mongodb-prebuilt@6.5.0/node_modules/mongodb-prebuilt/built/mongodb-prebuilt.js:17:36)
    at new MongoBins (/node_modules/.pnpm/mongodb-prebuilt@6.5.0/node_modules/mongodb-prebuilt/built/mongo-bins.js:20:36)
    at new MongodHelper (/node_modules/.pnpm/mongodb-prebuilt@6.5.0/node_modules/mongodb-prebuilt/built/mongod-helper.js:15:29)
    at new MockMongoose (/node_modules/.pnpm/mock-mongoose@8.0.1-a/node_modules/mock-mongoose/built/mock-mongoose.js:54:29)

seems like it was possible to overcome this https://github.com/nodkz/mongodb-memory-server/issues/422

AlonMiz commented 2 years ago

for anyone getting here ended up using mongodb-memory-server