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

& {} throws unknown error #1120

Closed
nirazul opened this issue Sep 3, 2015 · 7 comments
Closed

& {} throws unknown error #1120

nirazul opened this issue Sep 3, 2015 · 7 comments

Comments

@nirazul
Copy link

nirazul commented Sep 3, 2015

I've noticed that a sass file consisting of only &{} throws the following error in node-sass:
{ [Error: unknown] message: 'unknown', status: 5 }

...whereas @{} for example throws:
{ [Error: invalid top-level expression] <...more>

More information about my build:

Executed command:

var sass = require('node-sass');
sass.render({
  file: '/path/to/file/main.scss',
}, function(err, result) {
    console.log(err);
});

Versions:

  • node-sass: 3.3.2
  • node: 0.12.7
  • npm: 2.11.3

Is there anything else I can provide to help?

@saper
Copy link
Member

saper commented Sep 3, 2015

https://github.com/sass/libsass/wiki/API-Documentation says 5 means "unknown error" :)

@nirazul
Copy link
Author

nirazul commented Sep 3, 2015

Ok, then this is completely libsass related.
What would you propose? File a ticket there as this looks like an error or at least the wrong error code?

@saper
Copy link
Member

saper commented Sep 3, 2015

I guess it might be sass/libsass#1519 but let me check.

@saper
Copy link
Member

saper commented Sep 3, 2015

Here's what Ruby Sass says:

Error: Base-level rules cannot contain the parent-selector-referencing character '&'.
        on line 1 of /home/saper/sw/nodes-sass-problems/1120/test.scss
  Use --trace for backtrace.

@saper
Copy link
Member

saper commented Sep 3, 2015

A kind of fix is in sass/libsass#1524

@saper saper added this to the next.libsass milestone Sep 3, 2015
@ChrisCinelli
Copy link

Related to webpack-contrib/sass-loader#156

@xzyfer
Copy link
Contributor

xzyfer commented Oct 24, 2015

Fixed in #1214. Will be in v3.4.0.

@xzyfer xzyfer closed this as completed Oct 24, 2015
@xzyfer xzyfer modified the milestone: next.libsass Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants