sass / sass/embedded-host-node

EPIPE on Mac (Apple Silicon)

Open
#387 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs info
Dominant language
TypeScript
Stars
228
Forks
33
Avg merge
5d 16h
Merged PRs (30d)
2

Description

When using sass-loader with sass-embedded in rspack, I get the following error:

> RSPACK_CONFIG_VALIDATE=loose rspack build

node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:962:11)
    at Socket._write (node:net:974:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at AsyncCompiler.writeStdin ((omitted for privacy)/node_modules/sass-embedded/dist/lib/src/compiler/async.js:60:28)
    at PacketTransformer.writeInboundBuffer ((omitted for privacy)/node_modules/sass-embedded/dist/lib/src/compiler/async.js:114:18)
    at PacketTransformer.writeInboundProtobuf ((omitted for privacy)/node_modules/sass-embedded/dist/lib/src/packet-transformer.js:68:18)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v18.20.3

Loader configuration:

{
    loader: 'sass-loader',
    options: {
        api: 'modern-compiler',
        implementation: require.resolve('sass-embedded'),
        sassOptions: {
            logger: console,
            includePaths: [
                injectable('styles'),
                src('styles'),
                src('.'),
            ],
        },
    },
},
    "sass-embedded": "^1.89.2",
    "sass-loader": "^16.0.5",

Honestly not sure what to do. Any help would be appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported rspack build failure on an Apple Silicon Mac using the shown sass-loader configuration and the listed sass-embedded and sass-loader versions. Start with the emitted sass-embedded async compiler stack and determine the conditions that close the stdin pipe; done means the build completes without the EPIPE error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.