【发布时间】:2019-12-14 16:44:52
【问题描述】:
我已经使用以下命令在工作 expressjs 应用程序中安装了 mocha chai:
npm install mocha chai sinon supertest --save-dev
当我使用 npm run start 运行应用程序时,出现以下错误:
events.js:167
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::8001
at Server.setupListenHandle [as _listen2] (net.js:1334:14)
at listenInCluster (net.js:1382:12)
at Server.listen (net.js:1469:7)
at Object.<anonymous> (folderName/app.js:33:24)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
如何解决这个问题?
【问题讨论】:
标签: node.js express testing npm mocha.js