You can remove error 'gulp' is not recognized as an internal or external command by adding gulp path in PATH variable in environment variable.
I was setting up my angular js application and installed required softwares and tools. I installed npm globally using npm install -g npm. I tried to install gulp using command npm install -g gulp and it was an easy installation but when I run gulp command in command prompt, it threw an error 'gulp' is not recognized as an internal or external command.
It was a simple mistake I forgot to implement. Simply add path of gulp in PATH variable in environment variable. Only point to remember is that copy path till npm only. You can find npm folder in AppData folder in user's account. To set it for every user use like below.
Follow below steps to setup gulp successfully.
1) I assume that npm, gulp is already installed globally and it looks like below. Go to location: C:/ > Users > Your UserName > AppData > Roaming
2) Now go to My Computer > Properties > Advance system settings > Environment Variables
3) Click "New" to add new variable "NODE_PATH" and add path of "node_module" in value field.
4) It will be added in system variable section.
5) Edit "Path" variable.
6) Add "Node_Module" path till "\AppPath\Roaming\npm" in Path variable as shown in below screenshot. Copy %AppData\npm to your Path variable.
7) Open command prompt and write "gulp -v". You will see gulp version showing on screen.
If version is showing correctly, means we are done. Now you can use gulp without any error.
Hope it helps you. Now you can use gulp as per your requirement to build and run your angular js application as well as for other related tasks.