Error watching file for changes: EPERM
gavinr opened this issue · 2 comments
gavinr commented
In the builder examples, the grunt watch task sometimes causes this error in Windows:
Fatal error: Error watching file for changes: EPERM

Seems to be related to the clean task running right before the sass and tsc try to write to the dist folder. If you comment out the 'clean', line, it causes this error not to happen, but that cannot be the solution because the case if you remove a file or something, that file will still be in dist.

gavinr commented
setting the clean task to only the contents of the dist folder seems to fix it:
clean: { 'dist': { 'src': 'dist/*' } },