You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node-sass version (node -p "require('node-sass').info"): node-sass 4.9.3, libsass 3.5.4
npm node-sass versions (npm ls node-sass): 4.9.3
I recently switched over to sass and am now in the process of updating my build scripts. However, I can't seem to get the following command to work.
"watch-sass": "node-sass src/ -o dist/ -w",
It works fine in most cases, but whenever I create an empty .scss file it crashes for good and I have to manually restart the watch process.
An example for a scss file that causes such a crash would be the following:
h1 {
}
I have also managed to produce this problem by using sass syntax instead of scss inside one of my files or by not closing one of my brackets before saving.
Here is the error log:
> node-sass src/ -o dist/ -w
D:\Development\Projekte\AssertShareWeb\node_modules\scss-tokenizer\lib\tokenize.js:265
if (ident.test(css) && (ident.lastIndex = pos || 1) && ident.exec(css).index === pos) {
^
TypeError: Cannot read property 'index' of null
at tokenize (D:\Development\Projekte\AssertShareWeb\node_modules\scss-tokenizer\lib\tokenize.js:265:87)
at Object.scss.tokenize (D:\Development\Projekte\AssertShareWeb\node_modules\scss-tokenizer\lib\entry.js:18:35)
at parseImports (D:\Development\Projekte\AssertShareWeb\node_modules\sass-graph\parse-imports.js:4:26)
at Graph.addFile (D:\Development\Projekte\AssertShareWeb\node_modules\sass-graph\sass-graph.js:69:17)
at D:\Development\Projekte\AssertShareWeb\node_modules\sass-graph\sass-graph.js:54:13
at arrayEach (D:\Development\Projekte\AssertShareWeb\node_modules\lodash\lodash.js:516:11)
at Function.forEach (D:\Development\Projekte\AssertShareWeb\node_modules\lodash\lodash.js:9342:14)
at new Graph (D:\Development\Projekte\AssertShareWeb\node_modules\sass-graph\sass-graph.js:53:7)
at Object.module.exports.parseDir (D:\Development\Projekte\AssertShareWeb\node_modules\sass-graph\sass-graph.js:156:17)
at Object.watcher.reset (D:\Development\Projekte\AssertShareWeb\node_modules\node-sass\lib\watcher.js:17:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! assetshare@0.0.0 watch-sass: `node-sass src/ -o dist/ -w`
npm ERR! Exit status 1
In order to avoid this I am currently creating my own watcher using nodemon:
npm -v
): 5.6.0node -v
): 8.11.3node -p process.versions
):node -p process.platform
): win32node -p process.arch
): x64node -p "require('node-sass').info"
): node-sass 4.9.3, libsass 3.5.4npm ls node-sass
): 4.9.3I recently switched over to sass and am now in the process of updating my build scripts. However, I can't seem to get the following command to work.
"watch-sass": "node-sass src/ -o dist/ -w",
It works fine in most cases, but whenever I create an empty .scss file it crashes for good and I have to manually restart the watch process.
An example for a scss file that causes such a crash would be the following:
I have also managed to produce this problem by using sass syntax instead of scss inside one of my files or by not closing one of my brackets before saving.
Here is the error log:
In order to avoid this I am currently creating my own watcher using nodemon:
The text was updated successfully, but these errors were encountered: