我已经安装了Gulp和Laravel,然后为项目安装了Bootstrap sass。 Gulp可以运行其他任务但是当它到达sass任务时,throws无法找到模块'.lib / source-map-generator'。
以下是gulp错误:
EX:
cards: Array[0]
length: 0
以下是我的gulpfile.js代码:
vagrant@homestead:~/Code/specflux$ gulp
[08:55:46] Using gulpfile ~/Code/specflux/gulpfile.js
[08:55:46] Starting 'default'...
[08:55:46] Starting 'sass'...
[08:55:46] 'sass' errored after 128 ms
[08:55:46] Error: Cannot find module './lib/source-map-generator'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/vagrant/Code/specflux/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/vinyl-sourcemaps-apply/node_modules/source-map/source-map.js:6:30)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
[08:55:46] Error in plugin 'run-sequence'
Message:
An error occured in task 'sass'.
[08:55:46] Finished 'default' after 162 ms
app.scss只有以下代码:
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.sass('app.scss');
});
如何修复gulp错误?