Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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
like image 559
Samson Avatar asked Jun 14 '26 03:06

Samson


1 Answers

Ran into the same issue, this is what worked for me:

  1. Delete each one of the files listed in the output of where npx, for example del "C:\Program Files\nodejs\npx"

  2. Run npm uninstall -g npx

  3. Run npm install -g [email protected] (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.

like image 145
jbuhacoff Avatar answered Jun 17 '26 14:06

jbuhacoff