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

[fix] Module not found: Error: Can't resolve 'http' in '[...]/node_modules/supertest/lib' #819

Open
1 of 3 tasks
mcoulont opened this issue Mar 20, 2023 · 1 comment
Open
1 of 3 tasks
Labels

Comments

@mcoulont
Copy link

This error occurs when running ng test (Angular/Karma/Jasmine)

Node.js version: v18.13.0se

OS version: Ubuntu 22.04.2 LTS

Description: Module not found: Error: Can't resolve 'http' in '[...]/node_modules/supertest/lib'

Actual behavior

ng test crashes and doesn't run

Expected behavior

ng test runs

Code to reproduce

it("webmaster's email address", async done => {
    const response = await request.get('/test')
    expect(response.status).toBe(200)
    expect(response.body.message).toBe('pass!')
    done()
 })

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
@mcoulont mcoulont added the bug label Mar 20, 2023
@mcoulont
Copy link
Author

mcoulont commented Mar 22, 2023

The http module doesn't seem available any more: see README.md in http homepage.
So, how is supertest suppose to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant