Docusaurus: Servers aren't shutting down with CTRL+C

Created on 5 Jul 2018  路  8Comments  路  Source: facebook/docusaurus

Is this a bug report?

Yes

Have you read the Contributing Guidelines on issues?

Yes

Environment

(Docusaurus version via npm outdated docusaurus or yarn outdated docusaurus, OS, Node, npm, yarn)

Steps to Reproduce

(Write your steps here:)

  1. Run npm start inside the "website" directory of your project
  2. Press CTRL+C
  3. Run npm start again several times.
  4. It will say:
Port 3000 is in use
Port 3001 is in use
Port 3002 is in use ... etc.
  1. And also say:
You already have a server listening on 35729
You should stop it and try again.
````

### Expected Behavior

<!--
  How did you expect your project to behave?
  It鈥檚 fine if you鈥檙e not sure your understanding is correct.
  Just write down what you thought would happen.
-->

I thought it would just shut down the server.

### Actual Behavior

<!--
  Did something go wrong?
  Is something broken, or not behaving as you expected?
  Describe this section in detail, and attach screenshots if possible.
  Don't just say "it doesn't work"!
-->

It looks like all of the servers are still running, then it throws this error:

Request failed: { Error: connect ECONNREFUSED 127.0.0.1:80
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 80 }
```

Reproducible Demo

https://github.com/nebrelbug/squirrelly-website

bug

Most helpful comment

Thanks! Finally got everything to work :)

All 8 comments

Seems like a bug indeed. I narrowed down the issue to the baseUrl. Basically any baseUrl that's not / will cause the error. To unblock yourself now, you could use / for the baseUrl value now.

@endiliey any ideas?

@nebrelbug
What is your base url ? I assume its not '/'

To unblock for now you can close the browser auto opened by the command line & manually type localhost:3000/yourbaseurl

@yangshun
The baseurl error is fixed in https://github.com/facebook/Docusaurus/pull/819

Oh I see. I'll release 1.3.2 tomorrow then. Closing this as a duplicate of #818.

Thank you both! Sorry that I didn't realize it was because of the baseURL. Should I download the new version tomorrow then?

I can now view the pages, but it still looks like the servers aren't shutting down. After a bit of Googling, it looks like it may just be a problem with Git Bash though.

I have yet to release 1.3.2. Will do it tonight and let you know when I do 馃尀

@nebrelbug v1.3.2 has been released.

Thanks! Finally got everything to work :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bhaskarhc picture bhaskarhc  路  23Comments

yangshun picture yangshun  路  70Comments

yanzhiwei147 picture yanzhiwei147  路  69Comments

yangshun picture yangshun  路  51Comments

t3573393 picture t3573393  路  25Comments