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

Error when I secondly run slater watch command #37

Open
kelfy opened this issue Jun 3, 2019 · 8 comments
Open

Error when I secondly run slater watch command #37

kelfy opened this issue Jun 3, 2019 · 8 comments

Comments

@kelfy
Copy link

kelfy commented Jun 3, 2019

This is first time I am using slater. When I first run "slater watch" which is fine. After I run "slater sync" then I come back and run "slater watch", the following error occur.

I've tried delete and whole theme and re-initialise the theme 3 times but no luck. Not sure what kind of error it is.

slater v1.4.1

watch development theme (https://xxxxx.myshopify.com/?fts=0&preview_theme_id=99999999999)

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

Error: listen EADDRINUSE :::4000
    at Server.setupListenHandle [as _listen2] (net.js:1360:14)
    at listenInCluster (net.js:1401:12)
    at Server.listen (net.js:1485:7)
    at Object.watch (/usr/local/lib/node_modules/slater/node_modules/@slater/compiler/index.js:81:10)
    at watch (/usr/local/lib/node_modules/slater/index.js:202:23)
    at <anonymous>
@estrattonbailey
Copy link
Member

@kelfy thanks! I'll have a look at this.

@estrattonbailey
Copy link
Member

@kelfy what OS and Node version are you on?

Also, would you mind trying something for me? Run slater watch, then slater sync, and then try opening https://localhost:4000 and let me know what you see.

:4000 is the port we use for live-reloading. It's possible that when those initial build and sync processes exit, the aren't closing the server properly. That could be caused by a number of things, including OS and Node versions.

@tomaszbujnowicz
Copy link
Contributor

I can also confirm that I have the same issue when running two instances of slater in the same time. When I switch between themes, I need to shut one of them down to work on another one. Anyway, it's nothing serious.

@kelfy
Copy link
Author

kelfy commented Jun 3, 2019

Thank you so much. Never thought about that. cheers for the comments.

@estrattonbailey
Copy link
Member

@kelfy hey no problem :) is your issue solved then?

@kelfy
Copy link
Author

kelfy commented Jun 4, 2019

@estrattonbailey not entirely solved but managed to get around by force release port 4000.

Is there a way to stop watching and release the port?

@estrattonbailey
Copy link
Member

@kelfy I'm sure there is. Would you mind having a look at my previous response and answering those questions? That would be super helpful. Thanks!

@kelfy
Copy link
Author

kelfy commented Jun 5, 2019

@estrattonbailey I tried but nothing showing up. DIdn't notice it got live-reload. I am sure my theme is alright as I can browse online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants