pnp/docker-spfx

there is no port: 5432

zhangguanzhang opened this issue · 9 comments

$ docker exec spfx ss -nlptu
Netid  State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
tcp    LISTEN     0      128       *:4321                  *:*                   users:(("gulp serve",pid=107,fd=21))
tcp    LISTEN     0      128      :::35729                :::*                   users:(("gulp serve",pid=107,fd=22))

Could it be that you have something else running on 5432 already?

# docker run -it --rm --name ${PWD##*/} -v $PWD:/usr/app/spfx -p 5432:5432 -p 4321:4321 -p 35729:35729 waldekm/spfx
spfx@4f33dc91ab3f:/usr/app/spfx$ yo @microsoft/sharepoint
? ==========================================================================
We're constantly looking for ways to make yo better! 
May we anonymously report usage statistics to improve the tool over time? 
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== No

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │  SharePoint Client-side  │
   `---------´   │         Solution         │
    ( _´U`_ )    │     Generator@1.13.0     │
    /___A___\   /╰──────────────────────────╯
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

Let's create a new SharePoint solution.
? What is your solution name? spfx
? Only SharePoint Online (latest) is supported.  For earlier versions of SharePoint (2016 and 2019) please use the 1.4.1 version of the generator. SharePoint Online only (latest)
? Where do you want to place the files? Use the current folder
? Do you want to allow the tenant admin the choice of being able to deploy the solution to all sites immediately without running any feature deployment or adding apps in sites? No
? Will the components in the solution require permissions to access web APIs that are unique and not shared with other components in the tenant? No
? Which type of client-side component to create? WebPart
Add new Web part to solution spfx.
? What is your Web part name? HelloWorld
? What is your Web part description? HelloWorld description
? Which framework would you like to use? React

   create package.json
    force .yo-rc.json
   create config/package-solution.json
   create config/config.json
   create config/serve.json
   create tsconfig.json
    force .vscode/extensions.json
    force .vscode/launch.json
    force .vscode/settings.json
   create config/deploy-azure-storage.json
   create config/write-manifests.json
   create src/index.ts
   create README.md
    force .gitignore
    force .npmignore
   create gulpfile.js
   create tslint.json
   create src/webparts/helloWorld/components/IHelloWorldProps.ts
   create src/webparts/helloWorld/components/HelloWorld.module.scss
   create src/webparts/helloWorld/components/HelloWorld.tsx
   create src/webparts/helloWorld/HelloWorldWebPart.ts
   create src/webparts/helloWorld/loc/en-us.js
   create src/webparts/helloWorld/loc/mystrings.d.ts
   create src/webparts/helloWorld/HelloWorldWebPart.manifest.json
   create teams/d9cc3a49-916a-4e5c-8e82-1fdd68584049_outline.png
   create teams/d9cc3a49-916a-4e5c-8e82-1fdd68584049_color.png

Changes to package.json were detected.

Running npm install for you to install the required dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated @types/anymatch@3.0.0: This is a stub types definition. anymatch provides its own type definitions, so you do not need this installed.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @opentelemetry/types@0.2.0: Package renamed to @opentelemetry/api, see https://github.com/open-telemetry/opentelemetry-js
npm WARN deprecated uuid@3.1.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"

> node-sass@4.14.1 install /usr/app/spfx/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/spfx/.npm/node-sass/4.14.1/linux-x64-83_binding.node

> node-sass@4.14.1 postinstall /usr/app/spfx/node_modules/node-sass
> node scripts/build.js

Binary found at /usr/app/spfx/node_modules/node-sass/vendor/linux-x64-83/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@rushstack/typings-generator/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

added 2232 packages from 1039 contributors and audited 2238 packages in 192.758s

114 packages are looking for funding
  run `npm fund` for details

found 105 vulnerabilities (8 low, 49 moderate, 45 high, 3 critical)
  run `npm audit fix` to fix them, or `npm audit` for details


   ╭───────────────────────────────────────────────────────────────╮
   │                                                               │
   │     New major version of npm available! 6.14.13 -> 8.1.3      │
   │   Changelog: https://github.com/npm/cli/releases/tag/v8.1.3   │
   │               Run npm install -g npm to update!               │
   │                                                               │
   ╰───────────────────────────────────────────────────────────────╯



      _=+#####!       
   ###########|       .-----------------------------------.
   ###/    (##|(@)    |          Congratulations!         |
   ###  ######|   \   |     Solution spfx is created.     |
   ###/   /###|   (@) |  Run gulp serve to play with it!  |
   #######  ##|   /   '-----------------------------------'
   ###     /##|(@)    
   ###########|       
      **=+####!       

spfx@4f33dc91ab3f:/usr/app/spfx$ gulp serve
Build target: DEBUG
[09:40:53] Using gulpfile /usr/app/spfx/gulpfile.js
[09:40:53] Starting 'serve'...
[09:40:53] Starting gulp
[09:40:53] Starting subtask 'spfx-serve'...
[09:40:53] [spfx-serve] To load your scripts, use this query string: ?debug=true&noredir=true&debugManifestsFile=https://0.0.0.0:4321/temp/manifests.js
[09:40:53] Warning - [spfx-serve] When serving in HTTPS mode, a PFX cert path or a cert path and a key path must be provided, or a dev certificate must be generated and trusted. If a SSL certificate isn't provided, a default, self-signed certificate will be used. Expect browser security warnings.
[09:40:53] Starting server...
[09:40:53] Finished subtask 'spfx-serve' after 95 ms
[09:40:53] Starting subtask 'pre-copy'...
[09:40:53] Finished subtask 'pre-copy' after 28 ms
[09:40:53] Starting subtask 'copy-static-assets'...
[09:40:53] Starting subtask 'sass'...
[09:40:53] Server started https://0.0.0.0:4321
[09:40:53] LiveReload started on port 35729
[09:40:53] Running server
[09:40:53] Opening https://enter-your-SharePoint-site/_layouts/workbench.aspx using the default OS app
[09:40:54] Finished subtask 'sass' after 928 ms
[09:40:54] Starting subtask 'tslint'...
[09:40:54] [tslint] tslint version: 5.20.1
[09:40:54] Starting subtask 'tsc'...
[09:40:54] [tsc] typescript version: 3.9.10
(node:108) UnhandledPromiseRejectionWarning: Error: Exited with code 3
    at ChildProcess.<anonymous> (/usr/app/spfx/node_modules/opn/index.js:84:13)
    at Object.onceWrapper (events.js:483:26)
    at ChildProcess.emit (events.js:376:20)
    at ChildProcess.emit (domain.js:532:15)
    at maybeClose (internal/child_process.js:1055:16)
    at Socket.<anonymous> (internal/child_process.js:441:11)
    at Socket.emit (events.js:376:20)
    at Socket.emit (domain.js:532:15)
    at Pipe.<anonymous> (net.js:673:12)
    at Pipe.callbackTrampoline (internal/async_hooks.js:134:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[09:40:55] Finished subtask 'copy-static-assets' after 1.95 s
[09:40:57] Finished subtask 'tslint' after 2.78 s
[09:40:58] Finished subtask 'tsc' after 3.45 s
[09:40:58] Starting subtask 'post-copy'...
[09:40:58] Finished subtask 'post-copy' after 209 μs
[09:40:58] Starting subtask 'configure-webpack'...
[09:40:58] Finished subtask 'configure-webpack' after 356 ms
[09:40:58] Starting subtask 'webpack'...
[09:40:59] Finished subtask 'webpack' after 1.05 s
[09:40:59] Starting subtask 'reload'...
[09:40:59] Finished subtask 'reload' after 2.1 ms

What I meant is, if it's possible that there's something else running on port 5432 on your host and which could be preventing Docker from mapping it to the container?

the container's network is not the host, You can find a Linux system without a graphical interface and try it like the above command after installing docker. You will run into the same problem

Sorry, but I'm not sure what you're saying. In the first command, you're running a command on your host, to execute a command inside the Docker container to show port mappings and 5432 isn't there. This could be caused by port 5432 being blocked on the host and which is why it can't be mapped to the same port inside the container.

This is what I can see in Windows.

  1. Starting a new container: docker run -it --rm --name spfx00 docker-spfx:1.13.1_00 /bin/bash -c "yo @microsoft/sharepoint --solution-name helloworld --framework react --component-type webpart --component-name hello-world-webpart --component-description 'HelloWorld web part' --is-domain-isolated true --skip-install --environment spo --skip-feature-deployment false && cd helloworld && npm install && gulp serve"
  2. Answer the question about usage statistics reports
  3. Wait until it is started (2 min)
  4. Not closing the console, run in another console: docker exec spfx00 ss -nlptu

Expected:

  1. Something like this in the first output:
[16:26:52] Starting subtask 'spfx-serve'...
Starting api server on port 5432.
Registring api: /getwebparts
Registring api: /.
Registring api: /workbench
  1. 5432 port is open on the container

Observed:

PS C:\projects> docker run -it --rm --name spfx00 docker-spfx:1.13.1_00 /bin/bash -c "yo @microsoft/sharepoint --solution-name helloworld --framework react --component-type webpart --component-name hello-world-webpart --component-description 'HelloWorld web part' --is-domain-isolated true --skip-install --environment spo --skip-feature-deployment false && cd helloworld && npm install && gulp serve"
? ==========================================================================
We're constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== Yes

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │  SharePoint Client-side  │
   `---------´   │         Solution         │
    ( _´U`_ )    │     Generator@1.13.1     │
    /___A___\   /╰──────────────────────────╯
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

A folder with solution name helloworld will be created for you.
A component for the spo environment will be created for you.
A web part with the name hello-world-webpart will be added to your solution with react framework.
Web part description is going to be HelloWorld web part.
Let's create a new SharePoint solution.
Add new Web part to solution helloworld.

    force helloworld/.yo-rc.json
   create helloworld/package.json
   create helloworld/config/package-solution.json
   create helloworld/config/config.json
   create helloworld/config/serve.json
   create helloworld/tsconfig.json
   create helloworld/.vscode/extensions.json
   create helloworld/.vscode/launch.json
   create helloworld/.vscode/settings.json
   create helloworld/config/deploy-azure-storage.json
   create helloworld/config/write-manifests.json
   create helloworld/src/index.ts
   create helloworld/README.md
   create helloworld/.gitignore
   create helloworld/.npmignore
   create helloworld/gulpfile.js
   create helloworld/tslint.json
   create helloworld/src/webparts/helloWorldWebpart/components/IHelloWorldWebpartProps.ts
   create helloworld/src/webparts/helloWorldWebpart/components/HelloWorldWebpart.module.scss
   create helloworld/src/webparts/helloWorldWebpart/components/HelloWorldWebpart.tsx
   create helloworld/src/webparts/helloWorldWebpart/HelloWorldWebpartWebPart.ts
   create helloworld/src/webparts/helloWorldWebpart/loc/en-us.js
   create helloworld/src/webparts/helloWorldWebpart/loc/mystrings.d.ts
   create helloworld/src/webparts/helloWorldWebpart/HelloWorldWebpartWebPart.manifest.json
   create helloworld/teams/25c39751-3e89-435e-bebf-948d24408942_outline.png
   create helloworld/teams/25c39751-3e89-435e-bebf-948d24408942_color.png

Changes to package.json were detected.
Skipping package manager install.



Skipping installation of dependencies. You should run "npm install"

      _=+#####!
   ###########|       .-----------------------------------.
   ###/    (##|(@)    |          Congratulations!         |
   ###  ######|   \   |  Solution helloworld is created.  |
   ###/   /###|   (@) |  Run gulp serve to play with it!  |
   #######  ##|   /   '-----------------------------------'
   ###     /##|(@)
   ###########|
      **=+####!

npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated @types/anymatch@3.0.0: This is a stub types definition. anymatch provides its own type definitions, so you do not need this installed.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated @opentelemetry/types@0.2.0: Package renamed to @opentelemetry/api, see https://github.com/open-telemetry/opentelemetry-js
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated uuid@3.1.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"

> node-sass@4.14.1 install /usr/app/spfx/helloworld/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/spfx/.npm/node-sass/4.14.1/linux-x64-83_binding.node

> node-sass@4.14.1 postinstall /usr/app/spfx/helloworld/node_modules/node-sass
> node scripts/build.js

Binary found at /usr/app/spfx/helloworld/node_modules/node-sass/vendor/linux-x64-83/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@rushstack/typings-generator/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

added 2232 packages from 1040 contributors and audited 2238 packages in 73.082s

114 packages are looking for funding
  run `npm fund` for details

found 98 vulnerabilities (8 low, 60 moderate, 27 high, 3 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Build target: DEBUG
[06:31:00] Using gulpfile /usr/app/spfx/helloworld/gulpfile.js
[06:31:00] Starting 'serve'...
[06:31:00] Starting gulp
[06:31:00] Starting subtask 'spfx-serve'...
[06:31:00] [spfx-serve] To load your scripts, use this query string: ?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js
[06:31:00] Warning - [spfx-serve] When serving in HTTPS mode, a PFX cert path or a cert path and a key path must be provided, or a dev certificate must be generated and trusted. If a SSL certificate isn't provided, a default, self-signed certificate will be used. Expect browser security warnings.
[06:31:00] Starting server...
[06:31:00] Finished subtask 'spfx-serve' after 50 ms
[06:31:00] Starting subtask 'pre-copy'...
[06:31:00] Finished subtask 'pre-copy' after 15 ms
[06:31:00] Starting subtask 'copy-static-assets'...
[06:31:00] Starting subtask 'sass'...
[06:31:00] Server started https://localhost:4321
[06:31:00] LiveReload started on port 35729
[06:31:00] Running server
[06:31:00] Opening https://enter-your-SharePoint-site/_layouts/workbench.aspx using the default OS app
[06:31:00] Finished subtask 'sass' after 504 ms
[06:31:00] Starting subtask 'tslint'...
[06:31:00] [tslint] tslint version: 5.20.1
[06:31:00] Starting subtask 'tsc'...
[06:31:00] [tsc] typescript version: 3.9.10
(node:1) UnhandledPromiseRejectionWarning: Error: Exited with code 3
    at ChildProcess.<anonymous> (/usr/app/spfx/helloworld/node_modules/opn/index.js:84:13)
    at Object.onceWrapper (events.js:520:26)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:537:15)
    at maybeClose (internal/child_process.js:1058:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:537:15)
    at Pipe.<anonymous> (net.js:686:12)
    at Pipe.callbackTrampoline (internal/async_hooks.js:130:17)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[06:31:01] Finished subtask 'copy-static-assets' after 1.18 s
[06:31:02] Finished subtask 'tslint' after 1.72 s
[06:31:02] Finished subtask 'tsc' after 1.86 s
[06:31:02] Starting subtask 'post-copy'...
[06:31:02] Finished subtask 'post-copy' after 157 μs
[06:31:02] Starting subtask 'configure-webpack'...
[06:31:03] Finished subtask 'configure-webpack' after 475 ms
[06:31:03] Starting subtask 'webpack'...
[06:31:04] Finished subtask 'webpack' after 1.12 s
[06:31:04] Starting subtask 'reload'...
[06:31:04] Finished subtask 'reload' after
PS C:\Windows\system32> docker exec spfx00 ss -nlptu
Netid  State      Recv-Q Send-Q Local Address:Port               Peer Address:Port
tcp    LISTEN     0      511    127.0.0.1:4321                  *:*                   users:(("gulp serve",pid=1,fd=21))
tcp    LISTEN     0      511      :::35729                :::*                   users:(("gulp serve",pid=1,fd=22))

I think the reason is that in SPFx 1.13 there were fundamental changes in the local web sites. For example, in 1.12 the content of the /config/serve.json was this:

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
  "port": 4321,
  "https": true,
  "initialPage": "https://localhost:5432/workbench",
  "api": {
    "port": 5432,
    "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
  }
}

So you see it included reference on the local workbench and api.

However, in SPFx 1.13 the local workbench is removed completely, so I guess you don't need to expect this port open when running solutions based on 1.13 SPFx.

I think need update the docs in the README.md

Great idea, I added this to the PR: #59

This issue is related: #53