6

Started getting this random error when I started a new project and made a new gulpfile.

I get it whenever I run gulp. It isn't just on this project it has started happening on all other projects.

I have read that there might be an issue with environment variables so I have updated these.

I have also recently ran the ruby installer.

Screenshot below shows my environment variables:

enter image description here I'm at a deadend.. Would appreciate some help.

Cheers

Update - Full Error message after running gulp:

gulp : The term 'gulp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + gulp + ~~~~ + CategoryInfo : ObjectNotFound: (gulp:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

MaxwellLynn
  • 613
  • 5
  • 19
  • 40
  • I have set the path in the variables myself. As I read this is somethign you need to do. any ideas how to fix? – MaxwellLynn Apr 01 '17 at 11:17
  • Revert it to the original `path` and add the path to ruby to the end of the original path. – Sulthan Apr 01 '17 at 11:20
  • I didn't have a path before. So I tried deleting it and it is still in the same condition :O – MaxwellLynn Apr 01 '17 at 11:21
  • Yeah so I've tried deleting it and doing a restart to my machine to see if it is effected. I have also tried removing the node variable as well just incase. Seem to still be getting the same problem though. – MaxwellLynn Apr 01 '17 at 11:29
  • Possible duplicate of [gulp command not found - error after installing gulp](https://stackoverflow.com/questions/24027551/gulp-command-not-found-error-after-installing-gulp) – GolezTrol Sep 17 '18 at 10:23

4 Answers4

12

In my case it was that I had to install gulp-cli by command npm -g install gulp-cli (also I had to install gulp localy in project)

Skylin R
  • 1,312
  • 1
  • 15
  • 22
2

I know this is a bit late to answer to question but who knows someone else might need it too. All you need to do is install gulp globally: npm install gulp -g and it will work just fine

  • Apparently running `npm install gulp --save-dev` is not sufficient, it really needs to be installed as a global package `npm install gulp -g` – DarkLite1 Feb 03 '20 at 08:22
0

I ran into this issue when I updated to the newest version of NPM. I reinstalled Node to version 6.11 and all my problems were solved. I was running Node 8.1 previously.

Node Downloads Page: https://nodejs.org/en/download/

If you go this route, ensure that the installer will add the necessary routes to your machine's path.

Node Installer - Add to Path

Sam Lindstrom
  • 59
  • 1
  • 12
0

I too get that same issue sometimes. It got solved by below steps. It might get solved with 1st step itself sometimes.

  1. Uninstall and install both node and gulp(global and local)

  2. Run npm config rm proxy

  3. Run npm config set registry http://registry.npmjs.org/

  4. Check path variables. Type environment variables in Windows and edit it to your installed path.