-1

Whenever I try running the npx and npm commands they always return this error:

'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe";c:#python34."
npm ERR! path C:\Users\user\Desktop\React-Apps
npm ERR! errno -4058
npm ERR! enoent spawn C:\Windows\system32\cmd.exe";c:#python34." ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2021-11-19T08_56_16_871Z-debug.log

Please Help

Jose Lora
  • 1,392
  • 4
  • 12
  • 18
  • Does this answer your question? ['npm' is not recognized as internal or external command, operable program or batch file](https://stackoverflow.com/questions/20992723/npm-is-not-recognized-as-internal-or-external-command-operable-program-or-bat) – jabaa Nov 19 '21 at 09:24
  • can you please check xthe version of npm NPM -v and show me the result thanks – mmantach Nov 19 '21 at 09:25

1 Answers1

0

Set path for node.js in your environment variables. To do this:

  1. right click on MyComputer->properties->advance system setting-> Environment variables-> select & edit "Path" variable in System variables.

2)Add C:\Program Files\nodejs\; in path

3)Restart your command prompt

4)Type node --version in a new console window, the version number should appear as a response.

Yash Falke
  • 233
  • 5
  • 15