Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install gulp 4

I've been using gulp-watch. The current version of gulp-watch relies on the call gulp.parrallel. This call is only available from gulp 4.

However gulp 4 is not available via the npm repo. npm info gulp dist-tags returns: { latest: '3.9.0' }.

I can see that there is a 4.0 branch within the git repo. But attempting to install it with variations on this command fails: npm install https://github.com/gulpjs/gulp#v4.0.0.

like image 470
dave dave Avatar asked Oct 30 '15 06:10

dave dave


People also ask

How do I update gulp to Version 4?

Upgrading gulp to v4 Once globally installed, gulp v4 will then need to be installed on a per-project basis. If in your package. json file gulp is listed under dependencies , then replace the --save-dev with just --save .


1 Answers

# Uninstall previous Gulp installation and related packages, if any $ npm rm gulp -g $ npm rm gulp-cli -g $ cd [your-project-dir/] $ npm rm gulp --save-dev $ npm rm gulp --save $ npm rm gulp --save-optional $ npm cache clean # for npm < v5  # Install the latest Gulp CLI tools globally $ npm install gulpjs/gulp-cli -g  # Install Gulp 4 into your project as dev dependency $ npm install gulp --save-dev  # Check the versions installed. Make sure your versions are not lower than shown. $ gulp -v --- [10:48:35] CLI version 2.0.1 [10:48:35] Local version 4.0.0 

Detail info is on this blog page: https://demisx.github.io/gulp4/2015/01/15/install-gulp4.html

like image 164
demisx Avatar answered Sep 18 '22 15:09

demisx