Reputation: 82467
When I run "FullPathHere\npm.exe" -v
on my dev machine I get 3.4.0.
When I copy that file to my build machine and run that (using the full path) I get 2.14.12.
Which is better than the installed version (which is 2.7.4), but not the V3 that I need.
Why is the same EXE not giving me the same version number?
Upvotes: 0
Views: 34
Reputation: 82467
Turned out I needed to use npm to update npm.
Once I did that, it updated to the latest version.
Upvotes: 0
Reputation: 2140
What file are you actually copying? There is no such thing as npm.exe in the standard Node install for Windows. There is npm.cmd, which is a batch script that ultimately calls the npm CLI which runs inside of the Node engine.
So to answer your question, it seems to me like you are simply copying the batch script, which simply uses your environment variables to execute whatever installed version of NPM you have.
Upvotes: 1