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

Cannot find module '_http_common' from 'stream.js' with restify + jest #4739

Closed
CNDW opened this issue Oct 21, 2017 · 2 comments
Closed

Cannot find module '_http_common' from 'stream.js' with restify + jest #4739

CNDW opened this issue Oct 21, 2017 · 2 comments

Comments

@CNDW
Copy link
Contributor

CNDW commented Oct 21, 2017

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Using Restify in jest tests causes a system level error
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.
https://github.com/CNDW/mock-couch-jest
What is the expected behavior?
the tests should run without error
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

I'm running into this issue trying to use the mock-couch package to built api tests on top of couchdb. I've reproduced the problem on a simplified repo. I have tested this on node v8.7.0 and v6.9.5 with the same result

The repo will produce the following error

    Cannot find module '_http_common' from 'stream.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:191:17)
      at Object.<anonymous> (node_modules/spdy/lib/spdy/stream.js:13:20)

mock-couch is built using restify so I believe the error is the same one outlined in #977

@SimenB
Copy link
Member

SimenB commented Oct 21, 2017

Feels like a dupe of #4677. Please send a PR fixing it!

@SimenB SimenB closed this as completed Oct 21, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants