Closed ThePoojaChavan closed 1 year ago
Hey @ThePoojaChavan: 👋 - Thanks for helping to make the reporter better by raising this ticket. I will take a look as soon as I can and get back to you. Cheers, Danny.
Hey @ThePoojaChavan
Have you tried with an older version of node, you can switch between these suing something like nvm
. I suspect that there is something in the reporter than is not currently compatible with version 18.
I would need to do a lot of testing to she what it might be so in the meantime, lowering the node version might unblock you.
Hi Danny, I just removed version 18 and installed an old version of node
C:>node -v v16.16.0
Same issue once again
The only thing I can really say is to do a full uninstall, followed by an install.
npm uninstall -g newman newman-reporter-htmlextra
then
npm install -g newman newman-reporter-htmlextra
It's a tricky one to debug without being on your machine - There's roughly 170K downloads a week and this is the first time i've seen anyone mention an installation issue. I would have thought that would have been flagged by more people 🤔
Did a full uninstall and re-installed Danny, same issue.
Don't know how to solve this, maybe I would just go with CLI for the time being.
Thanks
Are you able to install and use any of the other custom reporters for Newman?
Tried on Node v 16.16.0 , same issue for junit reporter as well
C:\>npm install -g newman-reporter-junitfull
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
C:\Users\AppData\Roaming\npm\node_modules\npm\lib\cli.js:48
throw err
^
Error: Cannot find module 'C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\glob\dist\cjs\src\index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:482:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\cacache\lib\util\glob.js:4:24)
at Module._compile (node:internal/modules/cjs/loader:1105:14) {
code: 'MODULE_NOT_FOUND',
path: 'C:\\Users\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\glob\\package.json'
}
That sounds like the issue is with your environment and the installation of node on your machine as it's not limited to only my reporter.
I would try and completely remove node from your machine and delete any node modules that you may have installed. Before trying everything again.
I'm going to close this issue as it isn't something specific to this reporter and I wouldn't be changing anything. Happy to talk more about this over on the Postman Community Forum.
Already removed all folders/ modules related to node, npm.
Re-installed nodejs v 16. Sadly, the issue is still there.
Thanks for your time and help Danny.
Regards
Couple of things you could try...
The first thing I'd recommend is ensuring that you have opened CMD in Admin mode.
Make sure you are using the latest version of npm. Update npm using the following command: npm install -g npm@latest
Sometimes, issues can arise due to cached data. You can clear the npm cache using the following command: npm cache clean --force However, I have done this before and it caused me more issues... so I would probably recommend this as a last resort.
Hi James,
Opened cmd in Admin mode
C:\Windows\System32>node -v v16.16.0
C:\Windows\System32>npm -v
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
C:\Users\AppData\Roaming\npm\node_modules\npm\lib\cli.js:48
throw err
^
Error: Cannot find module 'C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\glob\dist\cjs\src\index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:482:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.
C:\Windows\System32>npm install - g npm@latest
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
C:\User\AppData\Roaming\npm\node_modules\npm\lib\cli.js:48
throw err
^
Error: Cannot find module 'C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\glob\dist\cjs\src\index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:482:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.
Same error for npm cache clean --force
To be honest, it looks like an issue with Node... maybe try completely uninstalling Node.JS and then reinstall. Some info on uninstalling it here.
You could also try uninstalling NPM first then reinstalling npm uninstall -g npm npm install -g npm
You could also check your global install path
npm config get prefix
If it is wrong then update it using:
npm config set prefix "C:\Users\
Appreciate your reply, James.
I have uninstalled and completely removed all packages before re-installing lower node version.
npm uninstall -g npm gives same previous error message.
npm config get prefix also gives same error message.
Will it help if I attach cli.js, package.json and index.js?
If 'npm config get prefix' doesn't work then I think this is very much an issue with your computer/environment. It sounds like your computer simply doesn't know where the NPM modules are stored.
Have you tried setting as I mentioned above?
npm config set prefix "C:\Users<your-username>\AppData\Roaming\npm"
Just tried the setting npm config set prefix "C:\Users\AppData\Roaming\npm"
Same error.
If this is a corporate machine I suggest you speak to your system administrators. If it's a personal machine, I'm not sure what else to suggest, but I think it is definitely your environment settings, not the reporter.
It's a personal machine.
I have checked PATH- system variables; just thinking aloud if it could be related to Windows 11. Other than that, I do not really know what else settings are causing the issue.
Thanks for all your help, appreciate it.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Is There An Existing Issue
What Are You Seeing
HTML extra reporter issues with Nodejs installation
Steps To Reproduce The Issue
Full Newman Command Or Node Script
HTMLEXTRA Version
1.22.11
Newman Version
5.3.2
Additional Context
No response