I have installed Gulp with Laravel and then installed Bootstrap sass for the project. Gulp can run other task but throws cannot find module '.lib/source-map-generator' when it arrives at the sass task.
The following is the gulp error:
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
The following is my gulpfile.js code:
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.sass('app.scss');
});
There app.scss only has the following code:
@import "../../../vendor/bower_components/bootstrap-sass/assets/stylesheets/bootstrap";
How to fix the gulp error?