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

grunt task failed – Fatal error: Cannot read property '1' of null #61

Closed
rastersysteme opened this issue Aug 1, 2014 · 3 comments
Closed

Comments

@rastersysteme
Copy link

This is my setup:

node --version

v0.10.26

grunt --version

grunt-cli v0.1.12
grunt v0.4.5

package.json:

"grunt-scss-lint": "0.3.1"

Gruntfile.js
grunt task configuration:

scsslint: {
    allFiles: [
        'sass/_test.scss'
    ],
    options: {
        compact: true
    }
}

grunt task:

grunt.registerTask('check-scss', [
    'scsslint'
]);

_test.scss:

.test {
    .foo,
    .bar {
        margin: 10px;
    }

    .foo,
    .bar {
        padding: 10px;
    }
}

By running grunt check-scss the task ended with a fatal error:

Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles
Fatal error: Cannot read property '1' of null

Now, if I set compactto false, the task ran through:

Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles
source/sass/blocks/_test.scss:7 [W] Merge rule `.foo,
    .bar` with rule on line 2
Warning: Task "scsslint:allFiles" failed. Use --force to continue.

Then I made another test with no comma separated selector in my SCSS-file:

.test {
    .foo {
        margin: 10px;
    }

    .foo {
        padding: 10px;
    }
}

I expected the same result but both tasks ran through!

with compact true:

Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles

source/sass/blocks/_test.scss
  6: Merge rule `.foo` with rule on line 2

Warning: Task "scsslint:allFiles" failed. Use --force to continue.

with compact false:

Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles
source/sass/blocks/_test.scss:6 [W] Merge rule `.foo` with rule on line 2
Warning: Task "scsslint:allFiles" failed. Use --force to continue.
@ahmednuaman
Copy link
Owner

Okay will look ASAP

@ahmednuaman
Copy link
Owner

Yep I see this too, fixing.

@ahmednuaman
Copy link
Owner

Pushed, let's see if Travis is happy

@ahmednuaman ahmednuaman mentioned this issue Aug 4, 2014
ahmednuaman added a commit that referenced this issue Aug 4, 2014
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