Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
I had created a new language(React Js) code snippet. But I am unable to run the npm test command
I am getting this error
Error: Cannot find module ‘./newmanResponses.json’
Require stack:
- G:\postman-code-generators\test\codegen\newman\newmanTestUtil.js
- G:\postman-code-generators\codegens\react-axios\test\newman\newman.test.js
- G:\postman-code-generators\node_modules\mocha\lib\mocha.js
- G:\postman-code-generators\node_modules\mocha\index.js
- G:\postman-code-generators\codegens\react-axios\npm\test-newman.js
- G:\postman-code-generators\codegens\react-axios\npm\test.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (G:\postman-code-generators\test\codegen\newman\newmanTestUtil.js:6:21)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'G:\\postman-code-generators\\test\\codegen\\newman\\newmanTestUtil.js',
'G:\\postman-code-generators\\codegens\\react-axios\\test\\newman\\newman.test.js',
'G:\\postman-code-generators\\node_modules\\mocha\\lib\\mocha.js',
'G:\\postman-code-generators\\node_modules\\mocha\\index.js',
'G:\\postman-code-generators\\codegens\\react-axios\\npm\\test-newman.js',
'G:\\postman-code-generators\\codegens\\react-axios\\npm\\test.js'
]
}
I had tried to find this error but unable to find anything. Can anyone help me understand what must be included in /newmanResponses.json in order to run the npm test command?