0

I am on a Windows 10 machine. I installed node from the node.js website. Node.js did not add the path to the path environment variable, and the node command didn't work in either powershell or the command prompt. Node.js installed at C:\Program Files\nodejs. I added this path to the path environment variable, and now it works in powershell but it fails when I try to run in in the command prompt.

When I try to use yarn create next-app --typescript in powershell, it says that 'node' is not recognized as an internal or external command, operable program or batch file.

Aayaan Sahu
  • 125
  • 1
  • 8
  • 1
    _How_ did you add the path to the environment variable? For general troubleshooting guidance re `$env:PATH` issues, see [this answer](https://stackoverflow.com/a/68414006/45375). – mklement0 Jul 26 '22 at 21:40
  • I added it via the *Edit the system environment variables* dialog box, and clicking *Environment Variables*, selecting the *PATH* variable and adding the nodejs path. – Aayaan Sahu Jul 26 '22 at 21:47
  • 2
    Whether or not shells invoked in the same OS user session see this change depends on how, specifically, they're invoked. To be safe, log out and back in, or reboot. – mklement0 Jul 26 '22 at 21:54
  • Not quite, but I've settled for temporarily changing the path variable in `cmd` every time. – Aayaan Sahu Jul 27 '22 at 16:53

0 Answers0