I get the following error
failed to locate@import file nib.style
when trying to compile by .styl files using gulp
Any idea how to fix it?
gulp.task('flat', function () {
gulp.src(['**/*.styl', '!**/**mixins**.styl', '!**/**variables**.styl'])
.pipe(stylus())
.pipe(gulp.dest('test/'));
});
{
"dependencies": {
"bower": "~1.4.1",
"gulp": "~3.9.0",
"gulp-complexity": "~0.3.0",
"gulp-connect": "~2.2.0",
"gulp-jscs": "~2.0.0",
"gulp-jscs-stylish": "~1.1.2",
"gulp-jshint": "~1.11.2",
"gulp-sloc": "~1.0.4",
"gulp-util": "~3.0.6",
"gulp-stylus": "~2.1.1",
"jshint-stylish": "~2.0.1",
"open": "~0.0.5",
"stylus": "~0.52.4",
"nib": "~1.1.0"
},
"name": "app",
"private": true,
"version": "0.0.0"
}
You need to tell gulp-stylus
to use nib
:
var nib = require('nib')();
...
.pipe(stylus({ use : nib }))
...