Unexpected response from worker
See original GitHub issueHi,
Do you want to request a feature or report a bug? Report a bug
What is the current behavior? A bunch of test fail after several passed test
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install
and yarn test
.
Users/sebastien/project/node_modules/jest-worker/build/worker.js:169
throw new TypeError('Unexpected response from worker: ' + response[0]);
^
TypeError: Unexpected response from worker: undefined
at _receive (/Users/sebastien/project/node_modules/jest-worker/build/worker.js:169:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:744:12)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
error Command failed with exit code 1.
I don’t know how I can give you more information, but please ask 🙏
What is the expected behavior?
Run all the tests
Please provide your exact Jest configuration
Run npx envinfo --preset jest
in your project directory and paste the
results here
System:
OS: macOS Sierra 10.12.6
CPU: x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Binaries:
Node: 6.9.5
Yarn: 1.3.2
npm: 4.6.1
npmPackages:
jest:
wanted: ^22.4.0
installed: 22.4.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
[BUG] jest-worker TypeError: Unexpected response from ...
In Next.js source code there is the line that causes tsnd to crash upon using jest workers launched with {enableWorkerThreads: false} options.
Read more >Gatsby Build Error "TypeError: Unexpected response from ...
Gatsby Build Error "TypeError: Unexpected response from worker: undefined" Hello, I'm trying to get a site deployed and just catching up on the...
Read more >Getting error on gatsby build command: TypeError ...
I am getting this error when I run the command $ gatsby build on the terminal. What gets my attention on this one...
Read more >An unexpected response was received from the server.
When i launch the compression of the images after some seconds i receive this message: “An unexpected response was received from the server.”....
Read more >nextjs ts-node-dev TypeError: Unexpected response from worker
nextjs ts-node-dev TypeError: Unexpected response from worker: undefined ... Проблема в использовании ts-node-dev. ... "dev": "next dev",. чтобы ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To be fair, I don’t think that’s something you should be addressing.
jest-environment-node
creates, viajest-util
, a deep copy of theprocess
object, to be used as a fake/mockprocess
object inside the context. But ourdeepCopy
implementation just references functions, so you end up with the realprocess.send
.The reason why no one noticed it is because this API is not usually used, and in our case (which we use), we have to mock
process.send
to assert thatjest-worker
does what is expected. 😄I’ve set up #5904 as a fix for the issue, but I’m not sure when it will be merged/released. We’re already in a
jest@23
alpha release, and it’s easter holidays. But I’ll make my best to have something shipped soon. 🙂Wow, awesome! That’s exactly the point. We use pmx which wasn’t mocked and which calls
process.send
function. Do you now if there is a known mock forprocess.send
?