1

when I try to perform these commands:

  1. node
  2. node -v
  3. react-native
  4. npx react-native start 5.npx react-native init Demo

It shows the error: The system cannot find the path specified.

I have already installed nodejs.

Also tried to uninstall and reinstall nodejs.

Environmental variables are: C:\Program Files\nodejs C:\Users\Ashish\AppData\Roaming\npm C:\Program Files\nodejs\node_modules\npm

I also tried C:\Program Files\nodejs\node_modules\npm\bin instead of C:\Program Files\nodejs\node_modules\npm

enter image description here

enter image description here

1 Answers1

1

Your problem seems to be some kind of directory problem. NPM/Node sometimes cannot resolve file directories and configurations, so we have to do this manually. Most solutions require you to make such changes manually. There are quite a few variations, but I think at least one of the advice given in the answers will fix the problem. You can choose the answer that suits your scenario or you can try one by one. Make sure you set up react-native/developer environment as specified in the documentation.

Here are potential solutions: One & Two

EkremAy
  • 139
  • 6