Raathigesh / majestic

⚡ Zero config GUI for Jest
MIT License
7.49k stars 173 forks source link

🐛 Majestic not showing ui #223

Open sschneider-ihre-pvs opened 2 years ago

sschneider-ihre-pvs commented 2 years ago

I only see the following on starting majestic ÿ

Majestic v1.8.1 is running at http://localhost:4000

System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
  Binaries:
    Node: 16.14.2
    Yarn: 1.22.4
    npm: 8.5.0
  npmPackages:
    jest: ^27.5.1 => 27.5.1
MattCollins84 commented 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
david-alexander commented 1 year ago

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: