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:
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
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.
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.
First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.
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)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With