Skip to content
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

In watch mode server doesn't start #229

Closed
edoroshenko opened this issue Apr 17, 2019 · 9 comments · Fixed by #299
Closed

In watch mode server doesn't start #229

edoroshenko opened this issue Apr 17, 2019 · 9 comments · Fixed by #299

Comments

@edoroshenko
Copy link

🐛 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
@gregberge
Copy link
Member

Hello @edoroshenko, thanks for the report, right now I don't have time to investigate it. @xiaoyuhen maybe?

@xiaoyuhen
Copy link
Contributor

Ummm, 🧐I thought i was fix that before.

Will check this issues again.

@xiaoyuhen xiaoyuhen self-assigned this Apr 18, 2019
@xiaoyuhen
Copy link
Contributor

Possible solution: I had installed watchman via npm install -g watchman but apparently this installs some garbage old version.

npm r -g watchman
brew install watchman

fixed the problem

@tobyn
Copy link

tobyn commented 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 cc9bbfa.

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 cc9bbfa

@gregberge
Copy link
Member

@xiaoyuhen maybe there is more, can you double check please?

@JaKXz
Copy link

JaKXz commented 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.

@gregberge gregberge reopened this Jun 9, 2019
@villelahdenvuo
Copy link

Seems like indeed the issue is caused by the commit linked by @tobyn Hopefully it can be fixed soon.

@gregberge
Copy link
Member

Feel free to submit a PR.

@Jiang-Xuan
Copy link

FezVrasta added a commit to FezVrasta/jest-puppeteer that referenced this issue Nov 28, 2019
FezVrasta added a commit to FezVrasta/jest-puppeteer that referenced this issue Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants