Newman.js gets opening during newman -v check in command line

newman.js gets opening during newman -v check in the command line. Anyone facing this issue? or how to fix it? thanks in advance

Hey @prabhumohan09

Welcome to the community! :star:

There’s not a lot of details to go off here so it will be difficult for other users to provide a solution.

Can you expand on what you’re doing, provide some step by step instructions on how to reproduce the problem you’re seeing. Screenshots and videos would also be help here too.

Steps;-
Installed newman using below command and observed newman@5.2.0 has installed
$ npm install -g newman

then I try to verify the version, so used the below command
$ newman -v
Instead of getting newman version the ‘newman.js’ file has opened in my machine

@prabhumohan09: newman -v (for Windows) and please try newman –version (for mac).

Using --version or -v shouldn’t really make a difference on either OS as those are just the long and short commands of the same thing.

The newman.js file in the Newman project contains the code that executes when those commands are used in the CLI. Does the same thing happen with you use -h?

The file is referenced in the package.json file in the bin object - https://docs.npmjs.com/files/package.json#bin

Not really sure what’s happening in your set up as I don’t know how you installed node.js - Does this same thing happen when you try and run other node scripts?

I would uninstall node, install everything again and try again with newman.

1 Like

@dannydainton Thanks for the response. I used to get a proper response for the newman version command earlier, As you said there might be an issue with my node setup. Let me check and get back to you if any concerns. thanks