Commit 3deb552
authored
fix: Dev server fixes (#8211)
🎉 Thanks for submitting a pull request! 🎉
#### Summary
* Remove listeners on failure to prevent leak
* Improve logging when running with`skipWaitPort`
```
BEFORE
===========
⬥ Setting up local dev server
⬥ Starting #custom dev server
⠋ Waiting for #custom dev server to be ready on port 19876
✔ #custom dev server ready on port 19876 ← misleading
╭──────────────────────── ⬥ ────────────────────────╮
│ Local dev server ready: http://localhost:28888 │
╰────────────────────────────────────────────────────╯
(node:67259) MaxListenersExceededWarning: ... 26 aborted listeners added to [IncomingMessage]
(node:67259) MaxListenersExceededWarning: ... 26 error listeners added to [IncomingMessage]
AFTER
============
⬥ Setting up local dev server
⬥ Starting #custom dev server
⠋ Waiting for #custom dev server to be ready on port 19876
╭──────────────────────── ⬥ ────────────────────────╮
│ Local dev server ready: http://localhost:28888 │
╰────────────────────────────────────────────────────╯
```
---
For us to review and ship your PR efficiently, please perform the
following steps:
- [ ] Open a
[bug/issue](https://github.com/netlify/cli/issues/new/choose) before
writing your code 🧑💻. This ensures we can discuss the changes and get
feedback from everyone that should be involved. If you\`re fixing a typo
or something that\`s on fire 🔥 (e.g. incident related), you can skip
this step.
- [ ] Read the [contribution guidelines](../CONTRIBUTING.md) 📖. This
ensures your code follows our style guide and
passes our tests.
- [ ] Update or add tests (if any source code was changed or added) 🧪
- [ ] Update or add documentation (if features were changed or added) 📝
- [ ] Make sure the status checks below are successful ✅
**A picture of a cute animal (not mandatory, but encouraged)**1 parent 0daf8ea commit 3deb552
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | | - | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
549 | 553 | | |
550 | 554 | | |
551 | 555 | | |
| |||
619 | 623 | | |
620 | 624 | | |
621 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
622 | 630 | | |
623 | 631 | | |
624 | 632 | | |
| |||
0 commit comments