Skip to content

TypeError: Cannot read property 'styles' of undefined #30

Open
@oscarhandsome

Description

@oscarhandsome

Gulp task:

gulp.task('purifycss', function() {
    return gulp.src('src/assets/css/*.css')
        .pipe(purify(['src/assets/js/*.js', 'src/*.html']))
        .pipe(gulp.dest('src'));
});

issue:

[15:25:36] Starting 'purifycss'...
[15:25:37] 'purifycss' errored after 1.15 s
[15:25:37] TypeError: Cannot read property 'styles' of undefined
at minify (C:\xampp\htdocs\projname.loc\node_modules\purify-css\lib\purifycss.js:994:51)
at purify (C:\xampp\htdocs\projname.loc\node_modules\purify-css\lib\purifycss.js:1005:24)
at C:\xampp\htdocs\projname.loc\gulpfile.js:208:15
at taskWrapper (C:\xampp\htdocs\projname.loc\node_modules\undertaker\lib\set-task.js:13:15)
at bound (domain.js:415:14)
at runBound (domain.js:428:12)
at asyncRunner (C:\xampp\htdocs\projname.loc\node_modules\async-done\index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:75:11)

Can somebody explain what mean this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions