-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reporter could not be loaded. #1969
Comments
Same issue using newman-reporter-junitfull. |
@vikiCoder - we need to console.warn the error raised in the line Line 347 in e26539a
Otherwise, the error shown is currently not clear whether it is a Lodi g issue or an issue with the reporter itself. |
I also encounter this issue newman: "htmlextra" reporter could not be loaded. |
Hey @shamasis @vikiCoder @codenirvana Following on from @shamasis' suggestion - Could we add something like this (The wording can be more helpful) to highlight where the issue might be: catch (error) {
console.warn(`Error: ${error.code} - Is "${reporterName}" installed in the same directory as Newman?`);
} At the moment, each time someone has an install issue with any reporter, the first place to go looking for an answer is the specific reporter's project, rather than on here. Or any other solution would be awesome :) |
Hey @karam94 Fixed my issue by adding the reporter in node_modules |
We added warnings so that one can differentiate whether the reporter was not found or was not loaded, in Newman version |
@coditva It seems that if the reporter is throwing a JavaScript error (in my case a SyntaxError), this confusing error is being displayed. What would speak against directly logging the error that has occurred? |
@vdespa If the reporter throws an error while we're That being said, we do show a warning and log the error when we fail to "load" the reporter, because Newman failed to execute the function successfully, which could be a problem with Newman or the reporter. @vdespa Hope that clears it up. @everyone Closing this issue for now since I'm pretty confident that Newman can differentiate between finding and loading a reporter. Feel free to re-open if you feel otherwise. |
I agree here. Nevertheless, the confusing message is still displayed. Maybe check if there was an error while loading the reporter and just say that an error has occurred while trying to load reporter-xyz. |
@lucky36999 Can you check where is e.g. On windows, running If they don't match, I would suggest you to run
|
Using TeamCity with build agents on AWS.
However, despite installing both newman & newman-reporter-teamcity globally, the reporter still cannot be loaded.
I have a feeling that this is due to the reporter being installed by npm somewhere differently to newman.
npm list -g suggests it is installed globally regardless. Any ideas?
Steps taken:
npm root -g:
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules
where newman:
C:\Users\Administrator\AppData\Roaming\npm\newman
npm config get prefix:
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm
npm list -g:
newman run PostmanTests\api\suites\CommercialMargins.postman_collection.json -e PostmanTests\api\config\Beta.postman_environment.json -g PostmanTests\api\config\Commercial.postman_globals.json -r teamcity:
[10:15:51][Step 6/6] newman: "teamcity" reporter could not be loaded. [10:15:51][Step 6/6] run
npm install newman-reporter-teamcity[10:15:51][Step 6/6] [10:15:52][Step 6/6] Process exited with code 0
Thanks in advance!
The text was updated successfully, but these errors were encountered: