-
Notifications
You must be signed in to change notification settings - Fork 1.3k
render error callback not called on import path error #1592
Comments
I made a demo project of the error to illustrated a related issue in another project but that could be illustrative here too: you can see how sass-brunch is unable to pass an error to brunch due to node-sass not calling its error callback internally, while running node-sass executable triggers the error |
…mport path probably due to node-sass 3.5 breaking change sass/node-sass#1474 related issues: sass/node-sass#1592 brunch/sass-brunch#111 brunch/brunch#1402
That is the Sass changelog, not Node Sass.
It is not. Please take a moment to read the post before spreading misinformation like this:
A simple reduce test case shows the error is produced as expected // index.scss
@import "no-such-file";
{
"formatted": "Error: File to import not found or unreadable: no-such-file\n Parent style sheet: /Users/michael/tmp/issue-1592/index.scss\n on line 1 of index.scss\n>> @import \"no-such-file\"\n ^\n",
"message": "File to import not found or unreadable: no-such-file\nParent style sheet: /Users/michael/tmp/issue-1592/index.scss",
"column": 1,
"line": 1,
"file": "/Users/michael/tmp/issue-1592/index.scss",
"status": 1
} This appears to be an issue with brunch or which ever package is calling |
@xzyfer my apologies for the mismatch on the breaking changes, I got to say I'm still confused on when the change on working directory import path happened then. There is still something bothering me here:
var sass = require('node-sass')
var options = {
file: 'whatever'
}
sass.render(options, function(err, result){
console.log('err', err)
console.log('result', result)
})
var sass = require('node-sass')
var options = {
file: 'whatever',
data: '@import \'../some/inexisting/file\';',
includePaths: [ '.', 'app' ]
}
sass.render(options, function(err, result){
console.log('err', err)
console.log('result', result)
}) It seems it either has to do with the |
Thanks for your understanding. Using both data and file is unsupported and
|
Sorry to insiste, but it doesn't look like the issue is that I'm passing both
var options = {
data: '@import \'../some/inexisting/file\';',
includePaths: [ 'app' ]
}
var options = {
data: '@import \'./some/inexisting/file\';',
includePaths: [ '.', 'app' ]
}
var options = {
data: '@import \'../some/inexisting/file\';',
includePaths: [ '.', 'app' ]
} |
Sorry, to be clear, passing both data and file is probably why you're seeing the a different issue
|
I am able to reproduce a process hang with var sass = require('node-sass')
var options = {
data: '@import "../does-not-exist";',
includePaths: ['.']
}
sass.render(options, function(err, result){
console.log('err', err)
console.log('result', result)
}) |
After some digging it looks like the issue is with |
I have confirmed this a bug in LibSass - sass/libsass#2106 |
The bug in LibSass was fixed in sass/libsass#2107, and the fix was released in v3.4.0. The version of LibSass used by node-sass was bumped to 3.4.0 for release v4.0.0. So I think this issue should be resolved in v4.0.0 onwards. |
Fix operator overloading for attribute selectors
following the removal of working directory-relative import (which I guess is the breaking change mentioned in #1474 ), compiling my old scss code rejected an error of the kind:
But while I do get this error from the executable
node-sass/bin/node-sass
, I never get it from the module itself:binding.render
is called, but neither theerror
nor thesuccess
, letting the callback passed to render hanging. Any clue where this difference of behavior comes from?The text was updated successfully, but these errors were encountered: