-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Compiling via Grunt-sass results in: Assertion failed: (val->IsString()) error #337
Comments
Since gulp-sass switched from version ~0.8.0 to version ^0.9.0 of node-sass I have the same problem.
|
Seeing the same thing, Grunt and Gulp. Only workaround I've found is to remove |
👍 Had the same issue when updating to gulp-sass to 0.7.2. Removing |
Could this be related in some way to #245? |
Nope, I do not have gulp.task('sass', function() {
return gulp.src('/home/michael.heuberger/binarykitchen/code/videomail.io/src/assets/scss/**/*.scss')
.pipe(sass({
outputStyle: 'nested',
errLogToConsole: true
}))
.pipe(gulp.dest('/home/michael.heuberger/binarykitchen/code/videomail.io/var/local/www/css'));
}); |
Seeing the same issue trying to update grunt-libsass to the latest version of node-sass. Has the API changed at all? |
Quick question, which version of node are you using here? We updated nan fairly recently, it might be related. |
@andrew I'm on 0.10.28 |
Seeing the same error with node-sass 0.9.2 and mincer 1.0.4 on node-sass when I enable I'm also using node 0.10.28 |
After so poking around this evening, I'm fairly sure this bug is related to the updated version of nan, but will need to dig further to determine exactly what's wrong cc @rvagg |
@andrew @benfrain Did you set At least in my case (using
Edit: For further reference, here is my gulp task:
|
I have the exact same issue as OP. |
Seeing same error and removing |
@adamyeats after mulling this over last night, I think you might be right in it being related to #245 |
Just tried to fix the same issue here and made it working, thanks to @ckihneman : Just had to pass both
|
I would have a poke at this but I can't get it to compile, and I blame git submodules ...
is there a libsass version mismatch here? what commit/branch of libsass should the submodule be at to make this work? |
@rvagg libsass has a submodule now, so you'll need to do |
imagePath triggers the same error. |
This is happening because I'm not sure what libsass is expecting for the case where you don't have a string to supply but I'd suggest something like this: char* CreateString(Local<Value> value) {
size_t count;
if (!value->IsString()) {
return 0;
}
return NanCString(value, &count);
} (assuming that libsass is going to accept a If you take the source_comments_spec.js file and change While you're at it, upgrade to NAN 1.2.0 and replace all of the |
Thanks for the insight @rvagg, I'll get a new issue opened up for upgraded NAN as well. |
That assert has been there since the string converters were first written. git blame says I added it on 2013-07-30, almost a year ago. My guess is that the upgrade of libsass changed something there, starting it to use non-string values. Also, |
My problem is this: sourceComments set to map
but it crashes gulp-sass and throws this error sourceComments set to normal or none
but the Can anyone offer any insight into this. Thanks. |
Not sure if this is helpful but I found this while searching for this error in gulp. I cleared out my SCSS file and gulp shows this error - but if I add anything at all to my CSS file, even charset declaration, the error is resolved. Hope this helps someone.. |
For more information on this bug, see sass/node-sass#337. Source maps will be re-enabled as the default upon resolution of the upstream bug.
+1 same thing happened to me with gulp. |
I had the same problem but I resolved it adding some content to the empty SCSS file. Thanks @tobyl |
I had this problem for a while. Turns out some @import path was wrong in an .scss file. Get rid of SourceMaps and check your paths |
@gorkamolero – that's not the solution for the problem I originally posted. Most of us will need to wait for the next node-sass release before we see this fixed. Certainly those of us using grunt-sass. |
I was having this same issue, turns out that my file paths were incorrect. Changed them to point at the right locations of my scss files and all was resolved. Hope this helps someone else! |
Yes, if your syntax and semantics don't trigger the bug then you are ok... until your syntax or semantics trigger the bug the next time... :) |
Speaking of this bug, this is fixed in the master branch. @keithamus I think we should consider making the next build this weekend. Thoughts? |
Same issue here. Is there already a way to fix this? Previous mentioned tips don't work for me. |
@verpixelt, you can try out the release candidate v0.9.4: |
v0.9.4 final is released; just use |
Thanks node-sass peeps. Appreciate all the hard work :) |
Can you use |
@Jakobud : Actually, gulp-sass is just a gulp plugin for node-sass. If you reinstall it, or just run npm update, it will automatically be using node-sass 0.9.4 |
Ah okay. I assumed it was depending on an old version of Okay after an
Should I open a separate issue regarding this? |
@Jakobud I'm not sure about that. What happens if you just delete node_modules and reinstall dependencies? |
Same error. Actually this is the beginning of the error, mean't to paste this above as well:
Strange that running as root is causing permissions issues. |
@Jakobud Honestly this looks like an issue with your npm and node-gyp set up. It'd start by updating your version of node and maybe using something like https://github.com/creationix/nvm. |
Yeah I got around the directory permission error`. Still a problem with node-gyp though. Bummer. I'm out of commission until this is fixed since it hosed my node_modules dir. :-( |
I got Here is my
And
I do not get this error if |
Just updated to the latest grunt-sass and when I try and compile I get this error:
Assertion failed: (val->IsString()), function _NanGetExternalParts, file ../node_modules/nan/nan.h, line 1725.
I'm presuming this is due to Libsass 2.0? Or am I (probably) doing something obviously stupid?
I've have tried nuking my node-modules folder and running
sudo npm install
afresh but the same issue.The text was updated successfully, but these errors were encountered: