node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

Silent error when using a custom importer

Open mosheKerbel opened this issue 4 years ago • 0 comments

When running node-sass with the default importer, an error would stop the process and return it with a failure.

{
  "status": 1,
  "file": "./src/files/textLn.scss",
  "line": 1,
  "column": 1,
  "message": "File to import not found or unreadable: ../../....",
  "formatted": "..."
}

But when using a custom importer, for example, node-sass-import-once Errors are not thrown, but silently written, so the process finishes and not stopped as expected.

It looks like this iteration over the importers is not handling the errors well: https://github.com/sass/node-sass/blob/886319b0c66af74145816fcc601ac0e7edbea1e9/lib/index.js#L320 I was unsure on how to handle it from here.

mosheKerbel avatar May 27 '21 13:05 mosheKerbel