Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

& {} 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants