Home Ask Us [How to Solve] : ‘node’ is not recognized as an internal or external command operable program or batch file

[How to Solve] : ‘node’ is not recognized as an internal or external command operable program or batch file

by Anup Maurya
5 minutes read

In this article, we learn how to resolve the following error : ‘node’ is not recognized as an internal or external command operable program or batch file.

As I am unable to install any package, from node collection library, using below command.

npm install -D tailwindcss

So I opened up a command prompt check the version of npm, catch to an error message: “‘node’ is not recognized as an internal or external command, operable program or batch file.”

A quick search around the web led me to believe the node executable was not in my PATH. Sure enough it was missing. Once I added node to my path I had to restart visual studio and sure enough everything worked again.

  • Open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables
  • In “User variables” or “System variables” find variable PATH and add node.js folder path as value. Usually it is C:\Program Files odejs;. If variable doesn’t exists, create it.
  • Restart your IDE or computer.

In case you are wondering the node executable should be in your C:\Program Files\nodejs folder.

In case you needed to check your PATH you can view it by right clicking the Computer in File Explorer or from the security settings in Control Panel. Once there select Advanced System Settings. A dialog will open with the Advanced tab selected. At the bottom is a button, Environment Variables.

related posts

Leave a Comment