I installed Gulp.js globally with Yarn:
$ yarn global add gulp --no-bin-links
yarn global v1.17.3
[1/4] Resolving packages...
warning gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "gulp@4.0.2" with binaries:
- gulp
Done in 5.76s.
$ yarn global add gulp-cli --no-bin-links
yarn global v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "gulp-cli@2.2.0" with binaries:
- gulp
Done in 1.60s.
(I'm using the --no-bin-links
parameter to avoid this error: error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../semver/bin/semver' -> '/path/to/project/public/components/accord/node_modules/.bin/semver'"
.)
The yarn global list
provides the expected output:
$ yarn global list
yarn global v1.17.3
info "gulp@4.0.2" has binaries:
- gulp
info "gulp-cli@2.2.0" has binaries:
- gulp
Done in 0.53s.
But when I now execute gulp
, old versions (Gulp 3.9.1
and Gulp CLI 2.2.0
are used:
$ gulp -v
CLI version: 2.2.0
Local version: 3.9.1
What is wrong here and how to install the required Gulp version globally correctly with Yarn and make this version be used?