Error: Cannot find module 'gulp-clone'问题的解决

安装完gulp环境,并且配置好gulpfile.js,执行静态文件压缩和代码混淆时,出现如下错误:

Error: Cannot find module 'gulp-clone'

Error: Cannot find module 'gulp-clone'问题的解决_第1张图片

Error: Cannot find module 'gulp-html'

Error: Cannot find module 'gulp-clone'问题的解决_第2张图片

 

配置文件如下:

/**
 * Created by 13
 **/
var gulp = require('gulp');
var clone = require('gulp-clone');
var htmlmin = require('gulp-htmlmin');
var gulpif = require('gulp-if');
var cssmin = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var useref = require('gulp-useref');
var clean = require('gulp-clean');
var imagemin = require('gulp-imagemin');

//压缩html
gulp.task('html', function () {
    var options = {
        removeComments: true,  //清除HTML注释
        collapseWhitespace: true,  //压缩HTML
        collapseBooleanAttributes: false,  //省略布尔属性的值  ==> 
        removeEmptyAttributes: false,  //删除所有空格作属性值  ==> 
        removeScriptTypeAttributes: true,  //删除
                    
                    

你可能感兴趣的:(gulp,nodejs)