Skip to content

MODULE_NOT_FOUND error in 7.2.0 #875

@ddolcimascolo

Description

@ddolcimascolo

Describe the bug

Node.js version: v24.11.1

OS version: Linux 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Description: Cannot run tests using supertest v7.2.0

Actual behavior

Tests immediately stop with this stacktrace
 Exception during run: Error: Cannot find module './Assertion'                                     
Require stack:                                                                                                                                                                                          
- /data/dev/rest2zapi/node_modules/supertest/lib/cookies/index.js                                                                                                                                       
- /data/dev/rest2zapi/node_modules/supertest/index.js                                       
- /data/dev/rest2zapi/backend/api/zapi.spec.js              

Expected behavior

Tests run fine

Code to reproduce

Simply require('supertest')

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions