NPM installation failure
I downloaded and installed node, however, when I try to check the npm version it show a message "select an app to open", though node is installed. Why?
Thanks for opening this, I'm experiencing the same issue on Docker too.
Hi @coder3086 👋 — thanks for opening this issue!
I haven't personally run into this exact problem before, but based on your description ("select an app to open" when running npm), it sounds like Windows is not recognizing the npm command as executable. I’ll share some steps that might help us isolate the cause.
Possible root causes
From what I understand so far, this can happen if:
-
npmis installed but not found in your PATH -
npm.cmdornpx.cmdis missing or corrupted - The file association for
.jsfiles is missing or broken (Windows doesn’t know to run them with Node.js) - You're trying to run
npmin a way that opens the file rather than executes it (e.g. double-clicking instead of using a terminal)
Let’s debug step-by-step
Could you please try running these commands in Command Prompt (not PowerShell or double-clicking files)?
where npm
dir "C:\Program Files\nodejs"
assoc .js
ftype jsfile
echo %PATH%
type "C:\Program Files\nodejs\npm.cmd"
Thanks for your help. I apprieciete it. It worked!!