$ npm install\nnpm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.\nnpm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.\nadded 647 packages, and audited 648 packages in 21s\n44 packages are looking for funding\n run `npm fund` for details\nfound 0 vulnerabilities\n$ uname -a\nLinux runner-ndqklj7-project-62502-concurrent-0dwq58 5.10.43-flatcar #1 SMP Tue Jun 15 19:46:57 -00 2021 x86_64 Linux\n$ cat /etc/os-release\nNAME=\"Alpine Linux\"\nID=alpine\nVERSION_ID=3.12.7\nPRETTY_NAME=\"Alpine Linux v3.12\"\nHOME_URL=\"https://alpinelinux.org/\"\nBUG_REPORT_URL=\"https://bugs.alpinelinux.org/\"\n$ ls -la /root/.cache/mongodb-binaries\n-rwxr-xr-x 1 root root 62824944 Jul 28 13:15 mongod-x64-alpine-4.0.25\n\n$ node --inspect testMongodserverMemory.js\nDebugger listening on ws://127.0.0.1:9229/e36e5b7e-f78b-4b2b-80d2-7387e33f9a0c\nFor help, see: https://nodejs.org/en/docs/inspector\nStarting the instance failed, enable debug for more information\n/builds/n_DqkLj7/0/di4b/projects/......../node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:233\n throw new Error('Spawned Mongo Instance PID is undefined');\n ^\nError: Spawned Mongo Instance PID is undefined\n at MongoInstance._launchMongod (/builds/n_DqkLj7/0/di4b/projects/............../node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:233:19)\n at MongoInstance.<anonymous> (/builds/n_DqkLj7/0/di4b/projects/................/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:147:39)\n at Generator.next (<anonymous>)\n at fulfilled (/builds/n_DqkLj7/0/di4b/projects/.................../node_modules/tslib/tslib.js:114:62)\nconst {MongoMemoryServer} = require('mongodb-memory-server');\nlet myPromise = new Promise(async function (myResolve, myReject) {\n console.log(\"before MongoMemoryServer create\")\n let mongo = await MongoMemoryServer.create();\n if (mongo) {\n myResolve(mongo);\n } else {\n myReject(mongo);\n }\n});\nmyPromise\n .then(async function (mongo) {\n console.log(mongo)\n await mongo.stop()\n })\n .catch(function (error) {\n console.log(error);\n })Alpine linux is not supported, because mongodb does not provide binaries for this as can be seen in #347
\ncurrent workaround for docker: #347 (comment)
\nbtw, you did not provide what versions are used
","upvoteCount":1,"url":"https://github.com/typegoose/mongodb-memory-server/discussions/516#discussioncomment-1082863"}}}-
|
hi, the stage on my ci istest_env_var_dev:
image: dockerproxy.tech.orange/node:16.5-alpine3.12
stage: test
script:
- npm install
- sleep 20
- uname -a
- cat /etc/os-release
- ls -la /root/.cache/mongodb-binaries
- node --inspect testMongodserverMemory.jsWhich give the following resultmy testconst {MongoMemoryServer} = require('mongodb-memory-server');
let myPromise = new Promise(async function (myResolve, myReject) {
console.log("before MongoMemoryServer create")
let mongo = await MongoMemoryServer.create();
if (mongo) {
myResolve(mongo);
} else {
myReject(mongo);
}
});
myPromise
.then(async function (mongo) {
console.log(mongo)
await mongo.stop()
})
.catch(function (error) {
console.log(error);
}) |
Beta Was this translation helpful? Give feedback.
-
|
Alpine linux is not supported, because mongodb does not provide binaries for this as can be seen in #347 current workaround for docker: #347 (comment) btw, you did not provide what versions are used |
Beta Was this translation helpful? Give feedback.
-
|
sudo apt-get install curl libcurl3 solving this |
Beta Was this translation helpful? Give feedback.
-
|
On CircleCI I've had success with using the |
Beta Was this translation helpful? Give feedback.
Alpine linux is not supported, because mongodb does not provide binaries for this as can be seen in #347
current workaround for docker: #347 (comment)
btw, you did not provide what versions are used