0

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.

enter image description here

enter image description here

zmag
  • 7,825
  • 12
  • 32
  • 42
  • 1
    Possible duplicate of [After installation of Gulp: “no command 'gulp' found”](https://stackoverflow.com/questions/22224831/after-installation-of-gulp-no-command-gulp-found) – Gereon Jun 21 '19 at 11:58
  • Ugh......images as code. Yucky. – DevOpsSauce Jun 24 '21 at 19:48

2 Answers2

0

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.

RS Dev
  • 45
  • 1
  • 11
0

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.

Joruus
  • 90
  • 7