Ken Ramirez
Ken Ramirez

Reputation: 335

Error: File to import not found or unreadable Gulp + Sass

im trying to compile Sass and refresh the browser with BrowserSync. Looks correctly making changes on styles.scss file, the problem is with the imported files. When i make some changes i get an error:

events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: dev\scss\styles.scss
Error: File to import not found or unreadable: base.
       Parent style sheet: C:/xampp/htdocs/test-gulp/dev/scss/styles.scss
        on line 1 of dev/scss/styles.scss
>> @import 'base';
   ^

    at options.error (C:\xampp\htdocs\test-gulp\node_modules\node-sass\lib\index.js:291:26)

This happens sometimes at the first time that i update the _base.scss file, but sometimes after the thrid or fourth update.

I made a repository on Github with my setup, hope you can help me: https://github.com/kenramirez12/gulp-sass-browsersync

Upvotes: 2

Views: 2400

Answers (1)

nazg
nazg

Reputation: 71

I think the problem is with your editor and more precisely - with atomic save behaviour. I don't know what text editor you use, but I had the same errors when I coding in sublime, and the solution was adding to the sublime settings this: "atomic_save": true. It helped me.

Upvotes: 2

Related Questions