ionic-team / ionic-pwa-toolkit

Build lightning fast Progressive Web Apps with zero config and best practices built-in. Go from zero to production ready with Ionic and Stencil (Web Components).
MIT License
635 stars 74 forks source link

clone, build, run: "code": "ENOENT" then Error: listen EADDRINUSE :::3333 #26

Closed peterennis closed 6 years ago

peterennis commented 6 years ago

Resources: Before submitting an issue, please consult our docs.

$ ionic -v
3.19.1

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

$ npm list @stencil/core
@stencil/starter@0.0.1 C:\ae\adaept.com\arehta
`-- @stencil/core@0.6.1

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:

{
  "error": {
    "errno": -4058,
    "code": "ENOENT",
    "syscall": "stat",
    "path": "C:\\ae\\adaept.com\\arehta\\www"
  }
}

Expected behavior: It runs

Steps to reproduce:

$ git clone https://github.com/ionic-team/ionic-pwa-toolkit.git arehta
$ cd arehta
$ git remote rm origin
$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
. . .
$ npm start

> @stencil/starter@0.0.1 start C:\ae\adaept.com\arehta
> npm run dev

> @stencil/starter@0.0.1 dev C:\ae\adaept.com\arehta
> sd concurrent "stencil build --dev --watch" "stencil-dev-server"

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3333
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1476:7)
    at Object.<anonymous> (C:\ae\adaept.com\arehta\node_modules\@stencil\dev-server\dist\index.js:88:64)
    at Generator.next (<anonymous>)
    at fulfilled (C:\ae\adaept.com\arehta\node_modules\@stencil\dev-server\dist\index.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
[26:06.3]  @stencil/core v0.6.1
[26:06.3]  build, app, dev mode, started ...
[26:06.3]  compile started ...
[26:10.5]  compile finished in 4.19 s
[26:12.2]  generate bundles started ...
[26:12.2]  generate bundles finished in 8 ms
[26:12.2]  generate app files started ...
[26:12.2]  compile global style start ...
[26:12.2]  compile global style finish in 1 ms
[26:12.2]  generate app files finished in 83 ms
[26:12.6]  build finished, watching for changes... in 6.25 s

Related code:

insert any relevant code here

Other information:

Looks like the server is stuck in the background. It is not open in any tabs. W10 x64

MT-- commented 6 years ago

Can you open your task manager, go to the Details tab, and kill any node.exe processes?

peterennis commented 6 years ago

That fixed it. Thanks! I will leave the ticket open as the toolkit should deal with, or report on this sensibly.

jgw96 commented 6 years ago

Hey @peterennis , this is actually beyond the control of the ionic PWA toolkit or stencil itself. The error your seeing is a standard OS level error coming from Node (in this case). I do wish these errors were more clear, but unfortunately, system level errors like this tend to be kind of cryptic. Because this is out of our control, I am going to close this issue for now. Thanks!