Skip to content

Errors when using with sass-loader #296

Open

Description

@VioletFlare

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

Activity

  1. changed the title [-]Crashes when using with sass-loader[/-] [+]Errors when using with sass-loader[/+] on May 8, 2024
  2. nex3 commented on May 8, 2024

    @nex3
    Contributor

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

  3. VioletFlare commented on May 9, 2024

    @VioletFlare
    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.

  4. nex3 commented on May 9, 2024

    @nex3
    Contributor

    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/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions