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

Errors when using with sass-loader #296

Open
VioletFlare opened this issue May 8, 2024 · 3 comments
Open

Errors when using with sass-loader #296

VioletFlare opened this issue May 8, 2024 · 3 comments
Labels
bug Something isn't working needs info

Comments

@VioletFlare
Copy link

VioletFlare commented May 8, 2024

Hello,

I have a pretty large codebase to compile and I was trying sass-embedded.
When I am running webpack with the following config:

					{
						loader: 'sass-loader',
						options: {
							sassOptions: {
								sourceMap: true,
								includePaths: [path.resolve(__dirname, 'Develop', 'Styles'), path.resolve(__dirname, 'WebComponents')],
							},
							implementation: require('sass-embedded')
						}
					}

Dart errors with the following error:

> webpack --config webpack.configs.dev.js --watch

../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22
../../runtime/bin/eventhandler_win.cc: 318: error: Failed to start read file thread 22

It looks like evenhandler_win.cc is a dart file.

https://github.com/dart-lang/sdk/blob/5e61fe62bc5179cf3c032a2362182dd7a5ed7a38/runtime/bin/eventhandler_win.cc#L9

@VioletFlare VioletFlare changed the title Crashes when using with sass-loader Errors when using with sass-loader May 8, 2024
@nex3
Copy link
Contributor

nex3 commented May 8, 2024

Can you provide a clean reproduction of this, ideally only using the Sass embedded API without the WebPack loader around it?

@nex3 nex3 added bug Something isn't working needs info labels May 8, 2024
@VioletFlare
Copy link
Author

Can you provide a clean reproduction of this, ideally only using the Sass embedded API without the WebPack loader around it?

Sorry, I cannot make a reproducible example using only sass-embedded api right now. However I have something that might aid in the reproduction of this case or which might serve as a temporary solution.

While I was running the webpack build using sass-embedded, the memory usage grew to 8 GB between the various node processes and dart executables running and got to a point where no memory was available. At some point I was running out of physical memory, my disk was nearly full (had nearly 250 MB left), after cleaning my disk I am not running into this issue anymore.

I forgot to mention I am using windows :)

So it seems as something related to Windows Virtual Memory management or Dart itself.

@nex3
Copy link
Contributor

nex3 commented May 9, 2024

That sounds like it may be an issue with sass-loader spawning too many instances of sass-embedded concurrently. This should be fixed by webpack-contrib/sass-loader#1195, but if you're using a version of WebPack that includes that PR you might want to file an issue there explaining the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info
Projects
None yet
Development

No branches or pull requests

2 participants