'Why do i get 'command not found' even after installing Expo completes successfully?
I have installed Expo-CLI and have the metro bundler running in localhost correctly. I also have an existing Expo account. However when I navigate into the expo project i created and type in any expo related command, it responds like Expo is totally foreign:
Can someone help me figure out what's missing here and how to resolve it please?
Solution 1:[1]
Add the path for the expo-cli to your system.
If you're using Windows then just follow these steps.
Press Windows Key and search for Edit the system environment variables
Go to Environment Variables
Go to User Variable for
Go to Path
Press New
Add %USERPROFILE%\AppData\Roaming\npm to the path
Restart your cmd/powershell
Try writing
expo --versionto see the version and voila it's working!
Solution 2:[2]
I got the same issue couple of days before, the solution that I found out is to keep "C:\Users\USERNAME\AppData\Roaming\npm" as the only path for npm global installation
to check the global path for npm, you can use npm config get prefix,
to set the global path for npm ,you can use npm config set prefix %PATH%
after that run npm install and everything will be working !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vikingslord |
| Solution 2 | peiting sun |

