package: mongo-memory-server
npm i -D mongodb-memory-server@latest
npm WARN deprecated @types/[email protected]: This is a stub types definition. get-port provides its own type definitions, so you do not need this installed.
> [email protected] postinstall /projects/erp-backend/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error: Error: Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination dosnt exist
+ [email protected]
updated 3 packages and audited 1523 packages in 9.407s
51 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
no
Is there a workaround to fix that?
Example of running test & debug : 1

Adding this to package.json & reinstalling mongodb-memory-server fixes my issue.
"config": {
"mongodbMemoryServer": {
"version": "latest"
}
},
if I try the above I get this:
failed to download/install MongoDB binaries. The error: TypeError: Invalid Version: latest
@ekelvin please open an new issue, detailing what system you are on
For me, "latest" did not work, the latest current version "4.4.1" worked:
"config": {
"mongodbMemoryServer": {
"version": "4.4.1"
}
}
Make sure that the link be created by MongoDownloadURL has the correct arch set up.
in my case it was trying to download the 1386 arch when I was actually running a x64 arch.
You can change the arch by
"config": {
"mongodbMemoryServer": {
"debug": "1",
"arch": "x64"
}
},
@tcanbolat if it thinks its i386, then it probably means the 32bit version of nodejs is installed
Most helpful comment
For me,
"latest"did not work, the latest current version"4.4.1"worked: