ant-design-pro icon indicating copy to clipboard operation
ant-design-pro copied to clipboard

🐛[BUG] yarn run test:e2e 首次成功运行,之后都无法再次运行

Open cyc2016 opened this issue 3 years ago • 3 comments

🐛 bug 描述

运行yarn run test:e2e,首次成功,之后再次运行就提示错误

📷 复现步骤

代码版本:mater分支,节点chore: use playwright

首次运行输出结果正常,再次运行时提示以下错误: > [email protected] serve D:\work\ant-design-pro > umi-serve events.js:352 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE: address already in use :::8001 at Server.setupListenHandle [as _listen2] (net.js:1320:16) at listenInCluster (net.js:1368:12) at Server.listen (net.js:1454:7) at Function.listen (D:\work\ant-design-pro\node_modules\umi-serve\node_modules\express\lib\application.js:618:24) at Object.<anonymous> (D:\work\ant-design-pro\node_modules\umi-serve\bin\umi-serve.js:74:5) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) Emitted 'error' event on Server instance at: at emitErrorNT (net.js:1347:8) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'EADDRINUSE', errno: -4091, syscall: 'listen', address: '::', port: 8001 }

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] serve: 'umi-serve' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] serve script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

首次运行yarn run test:e2e启动了serve,占用了8001端口,运行完毕好像没有kill掉相关进程导致8001端口一直被占用。 另外为啥umi-serve默认会用8001端口而不是8000?

cyc2016 avatar Dec 21 '21 07:12 cyc2016

还有,运行yarn run test会有警告,并且也会出错: image

cyc2016 avatar Dec 21 '21 08:12 cyc2016

same issue

soleshot avatar May 04 '22 14:05 soleshot

没有复现,是不是node版本或者是终端的问题i?

chenshuai2144 avatar Jul 11 '22 03:07 chenshuai2144

应该是node版本问题,建议使用nvm多切换几个版本尝试下

zhaojunpeng0425 avatar Sep 22 '22 06:09 zhaojunpeng0425