Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

node-sass throws error on empty .scss files #58

Closed
KamilLelonek opened this issue Sep 3, 2014 · 12 comments
Closed

node-sass throws error on empty .scss files #58

KamilLelonek opened this issue Sep 3, 2014 · 12 comments

Comments

@KamilLelonek
Copy link

Assertion failed: (val->IsString()), function _NanGetExternalParts, file ../node_modules/nan/nan.h, line 1725.

After brunch build or watch.

@es128
Copy link
Member

es128 commented Sep 3, 2014

sass/node-sass#337

for now, try downgrading to 1.8.1

@es128
Copy link
Member

es128 commented Sep 3, 2014

Or see if there's anything you could tweak in your config that might be leading to the error per the various suggestions in that thread.

@KamilLelonek
Copy link
Author

This is my config:

exports.config =
  paths:
    public: 'public'

  conventions:
    assets: /(assets|vendor\/assets|font)/

  files:
    javascripts:
      joinTo:
        'javascripts/app.js': /^app/
        'javascripts/vendor.js': /^(vendor|bower_components)/

    stylesheets:
      joinTo:
        'stylesheets/app.css': /^app/
        'stylesheets/vendor.css': /^(vendor|bower_components)/

@KamilLelonek
Copy link
Author

Problem occurs with .scss extension only.

@es128
Copy link
Member

es128 commented Sep 3, 2014

Yeah you're not setting any special sass plugin options there. Any chance you have any empty .scss files in your project?

You could also try providing the output of DEBUG=brunch:* brunch b

But I don't really know what's wrong, it's something upstream in node-sass/libsass. The easiest thing for you to do for the moment is pin your sass-brunch dependency to 1.8.1

@KamilLelonek
Copy link
Author

Yeah, I have empty .scss. Downgrading works, but I thing it's not the perfect solution.

@es128
Copy link
Member

es128 commented Sep 3, 2014

...and deleting or adding content to your empty .scss file(s) resolves the error?

@KamilLelonek
Copy link
Author

Yes.

@es128
Copy link
Member

es128 commented Sep 3, 2014

So maybe that's the perfect solution? What do you think?

@KamilLelonek
Copy link
Author

Not really, because it's confusing to fail build with empty files.

@es128 es128 changed the title Assertion failed: (val->IsString()), function _NanGetExternalParts node-sass throws error on empty .scss files Sep 3, 2014
@es128
Copy link
Member

es128 commented Sep 3, 2014

It appears node-sass has an unpublished fix for this type of error. You could try nudging them into releasing a new patch version.

The only thing sass-brunch might be able to control is skipping compilation when it knows the source file is empty to begin with.

@KamilLelonek
Copy link
Author

Ok. Thanks for your help.

es128 added a commit that referenced this issue Sep 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants