I installed gulp as their documentation says, but I can not use "gulp" command, because it gives me "-bash: gulp: command not found" error. When I use "npx gulp" then it works, but I do not know why.


I installed gulp as their documentation says, but I can not use "gulp" command, because it gives me "-bash: gulp: command not found" error. When I use "npx gulp" then it works, but I do not know why.


 
    
     
    
    Try to install gulp locally and globally using npm install command on git bash and globally with npm-g installl gulp-cli. Then adding gulp.cmd path to windows path environment variable.
 
    
    I know it's too late, but the short answer is that npx exists to solve this issue. 
npx search your packages into node_modules directory instead of globally. If you have gulp installed globally, gulp -v should work fine. But npx solves this and also solves the problem with different packages versions in different projects.
