无法找到模块“gulp-watch”错误引发

lvmkulzt  于 2022-12-08  发布在  Gulp
关注(0)|答案(2)|浏览(172)

错误**找不到模块'gulp-watch'**当我运行gulp时抛出。什么是错误的???
我安装了正确的大口

npm rm --global gulp
npm install --global gulp-cli
npm init 
npm install --save-dev gulp

我创建了这个gulpfile.js

var gulp = require('gulp'), watch = require('gulp-watch');
var cssnano = require('gulp-cssnano');
var pump = require('pump');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
// var htmlmin = require('gulp-htmlmin');

//Watch
gulp.task('stream', function () {
    // Endless stream mode 
    // gulp.watch('./css/*.scss', ['minifyHTML']);
    gulp.watch( 'assets/css/*.scss', ['styles']);
    gulp.watch( 'assets/js/*.js', ['scripts']);
    return watch('./css', { ignoreInitial: false })
        .pipe(gulp.dest('.'));
});

//bla bla (the rest)
ss2ws0br

ss2ws0br1#

watch = require('gulp-watch');需要此模块...
您需要安装它:npm install --save-dev gulp-watch

watbbzwu

watbbzwu2#

**只需运行此命令-**npm install --save-dev gulp-watch

相关问题