ant-design-pro
ant-design-pro copied to clipboard
🐛[BUG] yarn run test:e2e 首次成功运行,之后都无法再次运行
🐛 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?
还有,运行yarn run test会有警告,并且也会出错:
same issue
没有复现,是不是node版本或者是终端的问题i?
应该是node版本问题,建议使用nvm多切换几个版本尝试下