为什么我会改变gulp-change错误?

时间:2018-06-13 10:36:31

标签: react-native gulp gulp-changed

我的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 反应原生版本 - 2.0.1 我已经在全局和单独的项目中安装了所有依赖项。

1 个答案:

答案 0 :(得分:1)

出现拼写错误

替换此

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

通过

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