How Do I Update Path Npx Version?
When I Run Npx --Version, It Returns Me V6. X. X but After I Do Npm Install -G Npx, Yarn Global Add Npx, and It Shows Successful Download of Npx V10, Running...
When I run npx --version, it returns me v6.x.x
But after I do npm install -g npx, yarn global add npx, and it shows successful download of npx v10, running npx --version still returns me v6.x.x
Running where npx gives me:
C:\Program Files\nodejs\npx
C:\Program Files\nodejs\npx.cmd
C:\Users\Samson\AppData\Roaming\npm\npx
C:\Users\Samson\AppData\Roaming\npm\npx.cmd
1 Answer
Ran into the same issue, this is what worked for me:
Delete each one of the files listed in the output of
where npx, for exampledel "C:\Program Files\nodejs\npx"Run
npm uninstall -g npxRun
npm install -g npx@10.2.2(or whatever version you want to install)
After doing these steps, when I run npx --version I see the correct one, and the issue that required me to upgrade npx is fixed.