-1

我的 gulpfile 如下 -

'use strict';

//dependencies
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCss = require('gulp-clean-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var changed = requrie('gulp-changed');

运行 gulp 后出错。错误是针对var changed = requrie('gulp-changed');-

ReferenceError: requrie is not defined
    at Object.<anonymous> (/home/lap1/Desktop/ReactJS/react- 
test/gulpfile.js:9:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at execute (/usr/lib/node_modules/gulp- 
cli/lib/versioned/^3.7.0/index.js:28:18)
    at Liftoff.handleArguments (/usr/lib/node_modules/gulp- 
cli/index.js:175:63)

Gulp 版本 - 3.9.1 React 本机版本 -2.0.1 我已经在全局和单独的项目中安装了所有依赖项。

4

1 回答 1

1

有拼写错误

替换这个

var changed = requrie('gulp-changed');

经过

var changed = require('gulp-changed');
于 2018-06-13T11:12:28.127 回答