Skip to main content

Posts

Showing posts from May, 2021

NPM: peer dependency is not detected for global packages

  Issue : In npm, peer dependency is not detected for global packages like when you try to install "newman" and then install "newman-reporter-htmlextra" so that you can run Postman/Newman tests collection with htmlextra reporter, it keeps failing because no suitable Newman version is found: npm install -g newman npm install -g newman-reporter-htmlextra newman run "Publish.postman_collection.json" -e QAUS.postman_environment.json -r htmlextra --reporters cli,junit,htmlextra  --reporter-htmlextra-export TestReport.html You may get this error: "npm WARN newman-reporter-htmlextra@1.20.4 requires a peer of newman@^5.1.2 but none is installed. You must install peer dependencies yourself" Solution : Peer dependency and the required package should be installed together like:  npm install -g newman newman-reporter-htmlextra