stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: Error: write EPIPE while strating the dev server

Open marco9446 opened this issue 3 years ago • 2 comments

Prerequisites

Stencil Version

@stencil/[email protected]

Current Behavior

Whenever I start the Dev server with command stencil build --dev --watch --serve the process fails almost immediatly with this error:

> [email protected] start
> stencil build --dev --watch --serve

[46:52.0]  @stencil/core
[46:52.2]  v2.17.3
[46:54.7]  build, test-component, dev mode, started ...
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (node:internal/child_process:866:20)
    at ChildProcess.target.send (node:internal/child_process:739:19)
    at receiveFromMain (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\dev-server\index.js:48:27)
    at Object.emit [as callback] (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\dev-server\index.js:142:17)
    at Object.emit (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:2031:14)
    at BuildContext.start (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:13787:29)
    at onBuild (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:64504:14)
    at Object.tsWatchHost.afterProgramCreate (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:64352:11)
    at Z (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:8913:2292225)
    at Object.e.createWatchProgram (C:\Users\Marco.Ravazzini\stencil-issue\node_modules\@stencil\core\compiler\stencil.js:8913:2290238)
Emitted 'error' event on ChildProcess instance at:
    at node:internal/child_process:870:39
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  errno: -4047,
  code: 'EPIPE',
  syscall: 'write'
}

If I omit the --serve flag, it works without any problems.

Expected Behavior

the dev server should start as expected with watch mode enabled

Steps to Reproduce

The steps would be like the ones explained in the getting started guide

  1. npm init stencil
  2. chose components
  3. npm install
  4. npm start

In my case it fails as soon as i run npm start

Code Reproduction URL

https://github.com/marco9446/stencil-issue

Additional Information

node version: v16.16.0 npm version: 8.11.0

OS: Windows 10 build: 19044.1826

marco9446 avatar Aug 08 '22 07:08 marco9446

Hey @marco9446 👋

I'm unable to replicate this using the specified version of Node and npm on Windows. It's possible that you don't have permissions to run the dev server on your local filesystem (e.g. missing write permissions in that directory), but it's hard to say for sure. LMK if there's another way we can reproduce this on additional machines and we can go from there.

rwaskiewicz avatar Aug 08 '22 17:08 rwaskiewicz

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

ionitron-bot[bot] avatar Aug 08 '22 17:08 ionitron-bot[bot]

I had this issue too, but it resolved itself when I changed my deps to these versions:

    "@stencil/core": "^2.10.0",
    "@stencil/eslint-plugin": "^0.4.0",
    "@stencil/postcss": "^2.1.0",
    "@stencil/sass": "^1.5.2",

willholmeswastaken avatar Aug 22 '22 10:08 willholmeswastaken

I'm going to close this issue due to lack of being able to reproduce this issue. If this is still an issue, please feel free to create a new issue with a minimal reproduction URL for the team to pull down and take a look at. Thanks!

rwaskiewicz avatar Aug 22 '22 12:08 rwaskiewicz