-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error: Jest: Got error running globalSetup - .../node_modules/@shelf/jest-mongodb/setup.js, reason: Instance Exited before being ready and without throwing an error #12892
Comments
I installed Ubuntu 20.04 instead and made some changes and it's now working. I'm afraid I can't be sure if it was just the Ubuntu change that fixed it or there were other changes. |
If anything this is a bug report for the preset you're using, doesn't seem related to anything in this repo |
I'm using ubuntu 22.04 I get this problem too |
I was having same error on Ubuntu 22, i just tried with a different OS like windows and it worked. |
+1 can confirm this seems to be specific to Ubuntu 22.04 and particularly this preset (tests work fine when preset turned off and also work fine on my Mac OS workstation). Submitted an issue on the preset's repo: shelfio/jest-mongodb#351 |
I was looking for solutions to this problem and I realized that it just didn't work because I didn't have mongodb server installed on my machine. after i installed mongodb server it worked perfectly. it is working on: ubuntu 22.4 |
Yes indeed, that does seem to have fixed the problem. That said, I did have to take some possibly less than ideal steps to get MongoDB Community Edition installed on Pop_OS 22.04 as MongoDB has no offical build for 22.04 at the time. In order to install MongoDB using the instructions provided I had to manually install libssl1.1 which is not recommended for security reasons. tl;dr this isn't an issue with either Jest or the jest-mongodb plugin but with MongoDB's current incompatibility with Ubuntu 22.04. Seems this issue is known about by the Mongo team and they are actively working on a fix: https://www.mongodb.com/community/forums/t/installing-mongodb-over-ubuntu-22-04/159931 In the meantime, if you want to force install libssl1.1 to get this working, instructions are here: https://askubuntu.com/questions/1403619/mongodb-install-fails-on-ubuntu-22-04-depends-on-libssl1-1-but-it-is-not-insta |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
28.1.0
Steps to reproduce
Follow the steps in the docs: https://jestjs.io/docs/mongodb
package.json
:'jest.config.js`:
Expected behavior
Expect a test to run successfully
Actual behavior
Run a test and get the following error:
Additional context
I created the minimal node app to get this running.
Environment
System: OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish) CPU: (4) x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz Binaries: Node: 18.2.0 - /usr/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 8.9.0 - /usr/bin/npm npmPackages: jest: ^28.1.0 => 28.1.0
The text was updated successfully, but these errors were encountered: