question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

In `watch` mode server doesn't start

See original GitHub issue

šŸ› Bug Report

If I specify a server and start jest in the watch mode, the server seems to not start at all.

To Reproduce

Itā€™s reproducable in the create-react-app example. Clone the jest-puppeteer repo, move to examples/create-react-app, install modules and run npm run test:integrationWithWatch. It will fail, although npm run test:integration will work fine.

Expected behavior

npm run test:integrationWithWatch should pass

Link to repl or repo (highly encouraged)

https://github.com/smooth-code/jest-puppeteer/tree/cc9bbfa493349cc88273120996e713523cf86714/examples/create-react-app

Run npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard

Paste the results here:

## System:
 - OS: macOS Mojave 10.14
 - CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
 - Memory: 1.08 GB / 16.00 GB
 - Shell: 3.2.57 - /bin/bash
## Binaries:
 - Node: 8.12.0 - /usr/local/bin/node
 - Yarn: 1.13.0 - /usr/local/bin/yarn
 - npm: 6.4.1 - /usr/local/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
 - jest-puppeteer: ^3.7.0 => 3.9.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
JaKXzcommented, Jun 7, 2019

Sorry to comment on a closed issue @xiaoyuhen @neoziro, but I am seeing this error as well with a similar setup to the demo repo, with the following envinfo:

## System:
 - OS: macOS 10.14.5
 - CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
 - Memory: 76.57 MB / 8.00 GB
 - Shell: 5.7.1 - /usr/local/bin/zsh
## Binaries:
 - Node: 12.4.0 - /usr/local/bin/node
 - Yarn: 1.16.0 - /usr/local/bin/yarn
 - npm: 6.9.0 - /usr/local/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
 - jest-puppeteer: ^4.2.0 => 4.2.0 

I believe this issue needs to be reopened.

2reactions
tobyncommented, Apr 24, 2019

Iā€™m also seeing this issue, but not with the create-react-app example. It looks like thatā€™s because the example references jest-puppeteer 3.7.0, which predates commit cc9bbfa493349cc88273120996e713523cf86714.

I uploaded a minimal testcase at https://github.com/tobyn/jest-no-start-server. yarn test works, but yarn test --watchAll never tries to start the server at all. It just bails out of jest-puppeteer-environmentā€™s setup function here https://github.com/smooth-code/jest-puppeteer/blob/cc9bbfa493349cc88273120996e713523cf86714/packages/jest-environment-puppeteer/src/global.js#L23

Everything seems to work if I revert cc9bbfa493349cc88273120996e713523cf86714

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I execute typescript watch and running server at ...
My idea is merge the commands as tsc -w & node app.js but I can't work the two commands at the same time...
Read more >
Restarting debugger after file change doesn't work #86
Hi, I have the following configurations: Package.json script: "start-watch": "NODE_ENV=development ./node_modules/.bin/tsc-watch --onSuccessĀ ...
Read more >
How To Fix Minecraft Server Batch (.bat) File Cmd ... - YouTube
Double click on your batch file to attempt to run your server. ... File (.jar) server.jar file has the wrong name Error: Unable...
Read more >
webpack-dev-server
Start using webpack-dev-server in your project by running `npm i ... --no-static-watch Does not watch for files in static content directory.
Read more >
Troubleshoot video errors, buffering, and freezing - Android
Connection to server lost. ... Use a different browser to watch the video. ... If that doesn't work, try some of these troubleshooting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found