Open sschneider-ihre-pvs opened 2 years ago
I am getting the same, it opens the URL in the browser but nothing happens except it refuses to connect/times out.
using the --debug
flag shows nothing either
OS: Windows 11
Node: 14.81.1
NPM: 6.14.15
Jest: ^27.4.7
I know this is an old issue, but I've just come across some information that may be helpful.
I ran into the issue today, and did some digging into what was going on. It was getting stuck on this spawnSync
call, trying to list the tests. Basically this is running jest --listTests --json
.
When I run jest --listTests --json
manually. that hangs too, so that explains why Majestic was getting stuck. I haven't looked into exactly why this command hangs (it's probably something peculiar about the way my tests are set up, and not a Jest or Majestic issue per se), but I was able to work around it by adding --runInBand
to the Jest command line (based on this StackOverflow answer to a similar sounding issue). Then I was able apply this workaround to Majestic by adding the following to my package.json
:
"majestic": {
"args": ["--runInBand"]
}
Assuming the cause of the issue is the same for others, they may be able to use this workaround as well.
Although the underlying issue isn't in Majestic, it might be helpful to make a couple of tweaks to make this more debuggable, such as:
spawnSync
, as this blocks the main thread and causes the Majestic HTTP server to stop responding, making it impossible to load the UI.--debug
mode), or something to the UI (if there isn't already -- I wasn't able to test this due to the UI not loading because of spawnSync
) to show that it's trying to list the tests. That way you'd know where it was getting stuck.
I only see the following on starting majestic
ÿ
Majestic v1.8.1 is running at http://localhost:4000