无法使用 rsocket-tcp-client 包

Unable to use rsocket-tcp-client package

我想让客户端重新连接到我的服务器,以防服务器重新启动。因此,我正在尝试以下 piece of code。问题是,在将此行 "rsocket-tcp-client": "^0.0.23" 添加到我的 package.json 和 运行 $npm install && ng update && ng serve 之后,我收到以下错误消息:

Error: ./node_modules/rsocket-tcp-client/build/RSocketTcpClient.js
Module not found: Error: Can't resolve 'net' in '/Users/gitter/myproject/node_modules/rsocket-tcp-client/build'

Error: ./node_modules/rsocket-tcp-client/build/RSocketTcpClient.js
Module not found: Error: Can't resolve 'tls' in '/Users/gitter/myproject/node_modules/rsocket-tcp-client/build'

我们非常欢迎任何帮助。

如果要使用该示例代码,还需要安装 tlsnet 包。