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

Async converted to sync #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Async converted to sync #23

wants to merge 2 commits into from

Conversation

designstorming
Copy link

When dealing with large number of files (scss) which are deeply nested, readFirstFile simply halts after 4th file. Probably, it opens the same file twice and it halts at second file until it's closed (which never happens, for me, for unknown reason). Anyway, it's converted into readFileSync

@xzyfer
Copy link
Contributor

xzyfer commented Feb 5, 2016

This is due to a known node-sass issue due to a libuv (node) limitation. sass/node-sass#857

The official work around is to set process.env.UV_THREADPOOL_SIZE to value > 4.

I suggest add the following to the file calling node-sass.

process.env.UV_THREADPOOL_SIZE = Math.ceil(Math.max(4, require('os').cpus().length * 1.5));

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

Successfully merging this pull request may close these issues.

2 participants