-
Couldn't load subscription status.
- Fork 1.2k
Open
Description
Newman fails with ERR_REQUIRE_ESM when jose 6.x is installed due to postman-runtime trying to require() an ES module.
Error Location:
postman-runtime/lib/authorizer/asap.js:1:12
Current Behavior:
- Compatibility issue using jose 6.x.
C:...node_modules\postman-runtime\lib\authorizer\asap.js:1
var jose = require('jose'),
Error [ERR_REQUIRE_ESM]: require() of ES Module C:...node_modules\jose\dist\webapi\index.js from C:...node_modules\postman-runtime\lib\authorizer\asap.js not supported.
Instead change the require of index.js in C:...node_modules\postman-runtime\lib\authorizer\asap.js to a dynamic import() which is available in all CommonJS modules.
Expected Behavior
Newman tests to run successfully
Impact:
- Prevents Newman from running in projects using jose 6.x
- Affects CI/CD pipelines using Newman for API testing
Environment:
- Newman version: 6.2.1
- Node.js version: 18.20.4
- OS: Windows
Suggested Fix:
Update postman-runtime to use dynamic import() for jose
yadickson and thetumper
Metadata
Metadata
Assignees
Labels
No labels