First make sure the file is there.
IDE:vscode
node:7.10.0
node-sass:4.5.3
system:win10
When the sass file is modified for the first time will be prompted to save the error. Not for the second time to save the normal ... ...
Using notepad.exe also does not cause the problem.
After testing, the problem does not occur on other operating systems.
This sounds like a filesystem issue that's out of our control. See this documentation on configuring your editor to do atomic writes - https://webpack.js.org/guides/development/#adjusting-your-text-editor
I've created a PR that fix this problem: https://github.com/sass/node-sass/pull/2386
If want to try this fix, you can patch your node-sass local copy by replacing 'node_modules/node-sass/lib/render.js' with this version: https://github.com/marcosbozzani/node-sass/blob/bug-vscode-watch/lib/render.js
The diff is here: https://github.com/marcosbozzani/node-sass/commit/266861bf5761dcafd5d53d123264b965c861887c#diff-a485abf5b8f49de7f313d7799df3faf4
Thanks @marcosbozzani ! it's totally working for me now.
I have the same issue but that fix doesn't change anything.
Running "sass:compile" (sass) task
Verifying property sass.compile exists in config...OK
Files: sass/base, sass/components, sass/config, sass/layout, sass/theme -> build/css/style.css
Options: precision=10, implementation={"info":"node-sass\t4.9.3\t(Wrapper)\t[JavaScript]\nlibsass \t3.5.4\t(Sass Compiler)\t[C/C++]","types":{},"TRUE":{},"FALSE":{},"NULL":{}}
node-sass 4.9.3 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
Fatal error: File to read not found or unreadable: /var/www/projectthemes.src/pager.src/sass/base
Completed in 0.762s at Wed Sep 19 2018 08:30:41 GMT+0200 (Central European Summer Time) - Waiting...
/var/www/projectthemes.src/pager.src/sass/base is there and readable to the user. I don't understand why this error appears it totally doesn't make any sense. sass/base is not a file, it's a directory
ls -la sass/
total 28
drwxr-xr-x 7 user sudo 4096 Sep 14 11:10 .
drwxr-xr-x 10 user sudo 4096 Sep 19 08:29 ..
drwxr-xr-x 2 user sudo 4096 Sep 19 08:30 base
drwxr-xr-x 2 user sudo 4096 Sep 14 11:10 components
drwxr-xr-x 2 user sudo 4096 Sep 14 11:10 config
drwxr-xr-x 2 user sudo 4096 Sep 17 16:05 layout
drwxr-xr-x 2 user sudo 4096 Sep 14 11:10 theme
@marcosbozzani you are a life saver my man! Thanks
simply used yarn instead of npm and the error just gone !
Thank you @marcosbozzani . You're a life saver.
A ready to use patch is available here: https://github.com/marcosbozzani/patch-node-sass-watch
Most helpful comment
I've created a PR that fix this problem: https://github.com/sass/node-sass/pull/2386
If want to try this fix, you can patch your node-sass local copy by replacing 'node_modules/node-sass/lib/render.js' with this version: https://github.com/marcosbozzani/node-sass/blob/bug-vscode-watch/lib/render.js
The diff is here: https://github.com/marcosbozzani/node-sass/commit/266861bf5761dcafd5d53d123264b965c861887c#diff-a485abf5b8f49de7f313d7799df3faf4