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
.
I wrote a batch file that does the job based on what @demisx answered.
The problem I had was a missing npm config parameter 'prefix', so my global directory was the node binary directory. I am pretty sure this wasn't always the case, but I could (re-)set it running this script from the project root directory:
The script finally showed this:
Hope it helps!
Run the following to check the version of gulp cli that is installed on your machine.
If you are not running version 4, do the following to install gulp globally on your machine.
Now install gulp 4 locally
My installation was a bit different.
Running
Or
Gave me an error:
NB I was only having problems installing my local gulp-4 so I took a look at my last
package.json
installation and saw this:So my move was to install local gulp with
and that worked, installing local gulp 4 successfully.
I solved the issue by running: