Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp - The term 'gulp' is not recognized as the name of a cmdlet

Tags:

gulp

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

like image 313
MaxwellLynn Avatar asked Apr 01 '17 11:04

MaxwellLynn


People also ask

How do you fix gulp is not recognized as an internal or external command operable program or batch file?

To solve the error "'gulp' is not recognized as an internal or external command, operable program or batch file", install the gulp-cli package globally by running npm install -g gulp-cli , restart your terminal and make sure your PATH environment variable is set up correctly.

How do I install gulp?

To install Gulp locally, navigate to your project directory and run npm install gulp . You can save it to your package. json dependencies by running npm install gulp --save-dev . Once you have Gulp installed locally, you can then proceed to create your gulpfile.

How do I know if gulp is installed?

First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.


2 Answers

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)

like image 170
Skylin R Avatar answered Sep 24 '22 07:09

Skylin R


I know this is a bit late to answer this 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

like image 39
beginerTikoo Avatar answered Sep 24 '22 07:09

beginerTikoo