Does not work with Node.js v16
See original GitHub issueThis package only works with Node.js v12 & v14.
Here is the error in Node.js v16 environment:
> npx jest
Starting the instance failed, enable debug for more information
Error: Jest: Got error running globalSetup - /domain-impl-server/node_modules/@shelf/jest-mongodb/setup.js, reason: Instance Exited before being ready and without throwing an error!
at MongoInstance.<anonymous> (/domain-impl-server/node_modules/@shelf/jest-mongodb/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:134:25)
at Object.onceWrapper (node:events:514:26)
at MongoInstance.emit (node:events:394:28)
at MongoInstance.closeHandler (/domain-impl-server/node_modules/@shelf/jest-mongodb/node_modules/mongodb-memory-server-core/lib/util/MongoInstance.js:275:14)
at ChildProcess.emit (node:events:394:28)
at maybeClose (node:internal/child_process:1067:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
npm does not support Node.js v16.10.0 - Stack Overflow
I have installed nodejs v16.x from nodesource on ubuntu 20.04(latest). when i run 'npm -v' i get '8.1.2' back in console. So ...
Read more >npm WARN npm does not support Node.js v16 error [Solved]
The error "npm WARN npm does not support Node.js vX.Y.Z" occurs when you have incompatible versions of npm and Node.js installed. To solve...
Read more >Bringing forward the End-of-Life Date for Node.js 16
Do nothing. Node.js 16 will be at risk for any vulnerabilities in OpenSSL 1.1.1 for the last seven months of its lifetime.
Read more >npm does not support Node.js v SOLVED - YouTube
How to solve npm does not support Node. js v16.10.0 You should probably upgrade to a newer version of node as we npm...
Read more >How to fix 'npm does not support Node.js v14' error on ...
Uninstall node.js (Windows Add/Remove programs) · Manually delete the npm folder from your user profile (%APPDATA%/roaming/npm) · Install node.js ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turning on MONGOMS_DEBUG inside the container and manually running the tests gives the following error when trying to use the mongodb binary:
This is really a nail in the coffin for using Mongo 4.0.X as Node 16 images default to Buster and you cannot install libcurl3 with SSL support in Debian 10 or 11 (dropped support for SSLv1.0 which is what MongoDB 4.0.X is looking for). If you are using MongoDB v4.4 or higher, there should be no issue with the updated libcurl4 versions.
I’m testing the node:16-stretch and node:16-stretch-slim image to see if they will work for me.
My apologies for continuing to update this closed ticket. It’s clear the issue is not with the code in this repo or the code in mongo-memory-server packages. I have a feeling many people will run onto this in the not-too-distant future and maybe this issue can save them some work.
Ultimately using the
stretch
image did work out. I was not able to make thestretch-slim
image work. Both thenode:16-stretch
image and thenode:16.11.1-stretch
image worked for me.