错误-Windows Powershell中未知的侦听EADDRINUSE ::: 5432

时间:2018-10-19 20:32:18

标签: reactjs typescript gulp node-modules

在运行gulp服务--nobrowser时,出现以下错误:

{ Error: listen EADDRINUSE :::5432
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at Server.listen (net.js:1480:7)
at SpfxServeTask.executeTask (C:\Users\lipalath\_\EUS-Col-ColPub- 
PublishApps\PublishApps\node_modules\@microsoft\gulp-core-build- 
serve\lib\ServeTask.js:70:65)   
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 5432 }
[13:25:31] Error - Unknown
 listen EADDRINUSE :::5432
{ Error: listen EADDRINUSE 127.0.0.1:4321
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
typeof-compare is deprecated. Starting from TypeScript 2.2 the compiler 
includes this check which makes this rule redundant.

有人可以让我知道如何解决此问题吗?

1 个答案:

答案 0 :(得分:0)

运行命令gulp serve时遇到相同的错误。 gulp已经在另一个终端中服务了,没有检查一下,我正在另一个终端中运行gulp serve

enter image description here

因此,我不得不关闭一个终端并再次运行命令gulp serve。您还可以通过按CTRL + c停止一个终端。

这也适用于gulp watch