Node & Npm not recognized by WebStorm's terminal

13,444

Solution 1

I had similar issue. I had to select File -> Exit from the IntelliJ application as opposed to using IntelliJ's internal restart option: File -> Invalidate Caches / Restart -> Just Restart.

Solution 2

I had the similar problem like this.I was working with my project with another computer. and after that i decide to work with this project with my computer.so after moving the Files of project. i installed the Node.js and i had all of the paths about Node but when i was want to Run the project. i had this problem. i search a lot but nothing works. so i guess maybe when i restart my computer the new paths of variable system will work well. i restarted and my problem solved!

Solution 3

For those who are encountering this problem when you try to edit the run configuration, you have to put "start" as the command instead of "npm". By default Webstorm knows it's a npm project so it already starts with npm, you simply have to put the start command after that.

enter image description here

Share:
13,444
Admin
Author by

Admin

Updated on June 27, 2022

Comments

  • Admin
    Admin almost 2 years

    I have paths to Node and NPM in both my user defined environment variable PATH and in system variable Path.

    For node: C:\Program Files\nodejs

    For npm: C:\Users\Username\AppData\Roaming\npm

    Now node and npm are recognized by Windows Command Prompt but not by WebStorm's terminal. I get error:

    'node' is not recognized as an internal or external command

    Does anyone know what is problem? I could use WebStorm's terminal normally till today, but something went wrong and now I'm stuck.

    EDIT:

    echo %PATH% screenshot:

    enter image description here

    Settings/Tools/Terminal  
    

    screenshot:

    enter image description here

  • Sebastian Nielsen
    Sebastian Nielsen almost 5 years
    Yes, finally! You solved my issue! Who would have known all I had to do was press the "exit". What a nightmare ...
  • chris
    chris about 4 years
    If you have the JetBrains toolbox it seems you must also exit this or the path won't change
  • Olasunkanmi
    Olasunkanmi almost 3 years
    This actually worked for me just now. Thanks so much !