Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error when saving .sass #426

Closed
kev200 opened this issue Jan 6, 2016 · 5 comments
Closed

Unhandled error when saving .sass #426

kev200 opened this issue Jan 6, 2016 · 5 comments

Comments

@kev200
Copy link

kev200 commented Jan 6, 2016

Hey i would really need help here because i'm new to this stuff.

Problem : I start gulp and start editing my sass that is included in the main.sass , whenever i save for like 2 times the site crashes and i get error , while saving the main.sass doesn't give off error.
Tried copying all the content of the problematic .sass file to the main.sass and it works , but that means i can never include any other .sass files?

Error looks like this :

events.js:141
throw er; // Unhandled 'error' event
^
Error: assets\css\main.sass
Error: File to import not found or unreadable: 3-layouts/home
Parent style sheet: stdin
on line 5 of stdin

@import "3-layouts/home";
^

at options.error (C:\wamp\www\****\****\node_modules\node-sass\lib\index.js:277:32)

Thank you very much!

@name-k
Copy link

name-k commented Feb 26, 2016

I have the same problem for a long time. As a temporary workaround you can wrap watcher with setTimeout function.

In addition I can say that when you change included file - there is an error, but when you save main.scss which includes all other stuff - it works fine. Error is thrown not all the time, but quite often, 50/50 I would say.

@gfellerph
Copy link

I had the same issue and found it could be a race condition when a glob of multiple entry files with references to the same file (e.g. variables.scss) is passed to gulp.src("src/sass/*.scss"). It seems that both bundles get compiled at the same time, therefore node-sass is trying to read src/sass/shared/variables.scss at the same time, making it inaccessible for the second hit.

To reproducec the issue, try creating 3 or more entry files with @import statements referencing a shared file.

Probably a duplicate of #425 and #396

@dariakuznetsova
Copy link

To reproducec the issue, try creating 3 or more entry files with @import statements referencing a shared file.

tuelsch, did this help you?

@gfellerph
Copy link

Did what help me? Has there been an update regarding this issue?

@xzyfer
Copy link
Collaborator

xzyfer commented May 10, 2016

Unfortunately this issue an issue with gulp.watch and is out of our control. In my experience the issue get's better if you watch less files i.e. exclude bower_components and node_modules.

@xzyfer xzyfer closed this as completed May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants