I have read through a lot of posts regarding command not found error messages in the terminal but I can't find any specific to surge.
I am running into an error when using the surge command in my terminal. I ran npm install --global surge in my terminal and everything looks okay, but when I run the command surge it returns command not found.
The other npm packages on my computer work fine. I tested create-react-app and no errors. I am somewhat new to this, any advice would be appreciated!!
Thanks and cheers!!
There is a chance that the
surgebinary is missing from your terminal's currentPATH. To check if that is the case, locate where is the binary installed by default (in my machine is found under/usr/local/bindirectory) and check if that directory is present in yourPATH, by running:In case it is not, you can add it by running:
Then check if it works now:
If that's the case, to make this change persitent across reboots, you can
echothe currentPATHyou have defined:And then export the result of that last command to your
~/.bashrcfile, by adding this line: