Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Rendering '@charset "UTF-8";' gives an error. #44

kadishmal opened this Issue · 6 comments

4 participants


Originally reported at sass/node-sass#23. node-sass module uses libsass.

When I try to use it, it outputs 'undefined'

var sass = require('node-sass');

sass.render('@charset "UTF-8";', function(err, css){

The node-sass developer confirms that the problem originates from libsass. He says the following error is displayed when he tries to use sassc ( to render @charset "UTF-8";:

ERROR -- test.scss, line 1: top-level blockless directive must be terminated by ';'



Will work on the issue this week -- however, please be aware that for the time being, the "fix" will be to ignore the directive. As long as your SCSS files are UTF-8 they should work fine; we're still looking into how to handle different encodings.


Yes, I don't actually care about encodings either. All I want is the successful build.


What's the status of this bug? Thanks.


Just made the fix (i.e. ignoring the directive for now)! Sorry for the delay; other issues took prioritiy.


Nice, thank you! Now I just need those changes to get into node-sass. :-)

@akhleung akhleung closed this
@lunelson lunelson referenced this issue in sass/sass-spec

Add test for css directive ordering #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.