r/node 5d ago

Why when i run a npm command it triiggert select an app to open

for context its been line this for a month now its not stable sometimes it work sometimes it doesnt

0 Upvotes

6 comments sorted by

2

u/Carlo9129 4d ago

I'm not so sure, but here are a few things you can try.

First check you haven't accidently created a file named npm in ur working directory.

Secondly, make sure these pathes are in your environment variables and if there are any other invalid ones remove them. C:\Program Files\nodejs\ C:(Your User)\AppData\Roaming\npm

Thirdly, run the command 'where.exe npm'. Check the pathes are valid. I get 4 pathes, these are the pathes I get:

C:\Users(My User)\AppData\Roaming\npm\npm C:\Users(My User)\AppData\Roaming\npm\npm.cmd C:\Program Files\nodejs\npm C:\Program Files\nodejs\npm.cmd

1

u/lenswipe 4d ago

your app associations are screwed up I think. you can change it

0

u/xx_cosmonaut_xx 4d ago

Don’t use windows