docker run -it --rm node:11 /bin/bash
root@444a1d59d65f:/# npm init --yes
Wrote to /package.json:
{
"name": "",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
root@444a1d59d65f:/# npm install --save-dev mongodb-memory-server
> [email protected] postinstall /node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
mongodb-memory-server: binary path is /node_modules/mongodb-memory-server/node_modules/.cache/mongodb-memory-server/mongodb-binaries/latest/mongod
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of mongodb@>= 3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @1.0.0 No description
npm WARN @1.0.0 No repository field.
+ [email protected]
added 81 packages from 48 contributors and audited 166 packages in 35.706s
found 0 vulnerabilities
root@444a1d59d65f:/# node
> const path = require('path');
undefined
> const findCacheDir = require('find-cache-dir');
undefined
> path.resolve(findCacheDir({ name: 'mongodb-memory-server' }), 'mongodb-binaries');
'/node_modules/.cache/mongodb-memory-server/mongodb-binaries'