If the package has been installed globally, you can use the process below:
1. Create an environmental variable called NODE_PATH
2. Set it to: %AppData%\npm\node_modules or %AppData%\npm on windows 8-10
3. Close CMD, and Re-Open to get the new ENV variables
<p align="center">
<img src="https://i.stack.imgur.com/ZEJxP.png" title="Add Node path to environmental variables" />
</p>
Running npm ls and npm ls -g shows that they are installed, but the CMD can not find them due to the missing link.
[Source](https://stackoverflow.com/questions/24027551/gulp-command-not-found-error-after-installing-gulp)