gulp deploy rsync error //缺少模块lodash

时间:2015-06-11 08:12:33

标签: gulp jekyll rsync

我正在尝试通过rsync部署我的项目。我和jekyll安装了一个gulp。我安装了"缺少"模块lodash全局和项目文件夹,但没有更改错误。任何想法接下来要尝试什么?!

    module.js:338
    throw err;
          ^
Error: Cannot find module 'lodash._getnative'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/PATH_TO_MY_PROJECT/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js:9:17)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

这是在我的gulpfile.js

var rsync = require('rsyncwrapper').rsync;
var gulp = require('gulp');
var gutil = require('gulp-util');

gulp.task('deploy', function() {
  rsync({
    ssh: false,
    src: './build/',
    dest: '***@***:/***/***/',
    recursive: true,
    syncDest: true,
    args: ['--verbose']
  }, function(error, stdout, stderr, cmd) {
      gutil.log(stdout);
  });
});

1 个答案:

答案 0 :(得分:0)

如果找到解决方案:)模块中出现错误。所以我删除了每个node_modules文件夹并重新安装。现在它正在运作