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

'An importer must have either canonicalize and load methods, or a findFileUrl method' after migrating to 6 #873

Open
roniemartinez opened this issue Nov 28, 2024 · 1 comment

Comments

@roniemartinez
Copy link

We are trying to upgrade from 5.1.0 to 6.0.0 and following the guide from https://github.com/dlmanning/gulp-sass?tab=readme-ov-file#migrating-to-version-6

However, it seems an importer that we are using (node-sass-tilde-importer) is not compatible with this version.

// gulpfile.mjs

import * as dartSass from 'sass';
import gulpSass from 'gulp-sass';
import tildeImporter from "node-sass-tilde-importer";

const sass = gulpSass(dartSass);

// ...

gulp.task('app_sass', function () {
    return gulp.src(dir.app_scss + '*.scss')
        // ...
        .pipe(sass({importer: tildeImporter, style: 'compressed'}).on('error', sass.logError))
        // ...
});

Error:

Error in plugin "sass"
Message:
    static/app/scss/app.min.scss
An importer must have either canonicalize and load methods, or a findFileUrl method.

Are there any guides for this? Thanks

@xzyfer
Copy link
Collaborator

xzyfer commented Nov 28, 2024 via email

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

2 participants