Getting following error "newman: "html" reporter could not be loaded."

Hello there,

i have integrated newman + html-reporter with Jenkins. newman: “html” reporter could not be loaded is the error am getting and job is failed.

newman and newman-reporter-html are at the same level


The command am using is

newman run collection.json -e env.json -d data.csv --reporters cli,html --reporter-html-export “reports/report.html”

Below are the dev dependencies from package.json

“devDependencies”: {
“newman”: “4.4.0”,
“newman-reporter-htmlextra”: “1.5.5”,
“newman-reporter-html”: “1.0.2”

node -v : v8.12.0
npm -v : 6.4.1

Does the other reporter show the same error?

yes, other one shows shows the same error.

Boo :pensive:

Not sure about Jenkins but what I know of that error, is that I’ve seen it when I was creating the htmlextra reporter when I’d messed up something in the index.js file or when it’s not installed in the correct place (where Newman is).

I would suspect it’s the latter but like I said, I’m not too sure about Jenkins config / workspaces / where the script runs. :pensive:

Thanks Danny.

In my local computer(Win 10) html reporter works fine. But for “htmlextra” same issue is shown in my local computer. index.js is attached. can you suggest me any workaround?

If you grab the latest version of the htmlextra reporter and globally install this, it should just work.

npm i -g newman-reporter-htmlextra

If there has been local changes to that file, then it might not work but if it’s the latest 1.5.5 version, It should work fine.

Its working after installing globally in my local computer and Jenkins too, Thanks :grinning:

1 Like

Awesome! Let me know if you have any problems/improvements for the htmlextra reporter :slight_smile:

1 Like