Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-sassport throws an error #17

Open
iamnewton opened this issue Aug 7, 2018 · 0 comments
Open

gulp-sassport throws an error #17

iamnewton opened this issue Aug 7, 2018 · 0 comments

Comments

@iamnewton
Copy link

iamnewton commented Aug 7, 2018

Wasn't sure if I should submit ticket here since the errors are pointing to sassport. I should note that I'm using Gulp v4 and I've removed everything but the sassport part of the task and I just get a Segmentation fault: 11 error.

// gulpfile.js
'use strict';

const autoprefixer = require('gulp-autoprefixer');
const changed = require('gulp-changed');
const flexBugsFixes = require('postcss-flexbugs-fixes');
const postcss = require('gulp-postcss');
const sass = require('gulp-sass');
const sassport = require('gulp-sassport');
const sourcemaps = require('gulp-sourcemaps');

module.exports = (gulp, options) => {
    const files = `${options.dirs.source}/${options.files.scss}`;
    let outputStyle = 'expanded';
    if (options.environment !== 'development') {
        outputStyle = 'compressed';
    }
    const processCss = () => gulp.src(files)
        .pipe(changed(`${options.dirs.dest}/${options.files.css}`))
        .pipe(sourcemaps.init())
        .pipe(sassport([], {
            outputStyle,
            includePaths: [
                'node_modules/',
            ],
        }))
        .on('error', sass.logError)
        .pipe(autoprefixer({
            replace: true,
            cascade: false,
        }))
        .pipe(postcss([flexBugsFixes]))
        .pipe(sourcemaps.write('./'))
        .pipe(gulp.dest(`${options.dirs.dest}/styles`));

    gulp.task('css', processCss);
    gulp.task('css').description = 'Node.js bindings to libsass. <https://github.com/sass/node-sass>';
};
/styles/node_modules/sassport/dist/importer.js:46
    var _url$split$map = url.split('!').map(function (part) {
                             ^

TypeError: url.split is not a function
    at Object.<anonymous> (/styles/node_modules/sassport/dist/importer.js:46:30)
    at options.importer (/styles/node_modules/gulp-sassport/node_modules/node-sass/lib/index.js:331:31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant