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 > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" 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 [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" 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 "[email protected]" has binaries:
- gulp
info "[email protected]" 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?