gulp 4をインストールするにはどうすればいいですか?質問する

gulp 4をインストールするにはどうすればいいですか?質問する

私は gulp-watch を使っています。gulp-watch の現在のバージョンは、gulp.parrallel 呼び出しに依存しています。この呼び出しは、gulp 4 以降でのみ使用できます。

ただし、gulp 4 は npm リポジトリ経由では利用できません。npm info gulp dist-tags次が返されます: { latest: '3.9.0' }

Git リポジトリ内に 4.0 ブランチがあることがわかります。ただし、次のコマンドのバリエーションを使用してインストールしようとすると失敗しますnpm install https://github.com/gulpjs/gulp#v4.0.0

ベストアンサー1

# 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

詳細情報はこのブログページにあります:https://demisx.github.io/gulp4/2015/01/15/install-gulp4.html

おすすめ記事