[Nest] 13804 - 2022/11/28 17:45:18 LOG [RouterExplorer] Mapped {/, GET} route +2ms
[Nest] 13804 - 2022/11/28 17:45:18 LOG [NestApplication] Nest application successfully started +2ms
[Nest] 13804 - 2022/11/28 17:45:18 ERROR [NestApplication] Error: listen EADDRINUSE: address already in use :::3000 +2ms
[Nest] 13804 - 2022/11/28 17:45:18 LOG [NestApplication] Nest application successfully started +2ms
[Nest] 13804 - 2022/11/28 17:45:18 ERROR [NestApplication] Error: listen EADDRINUSE: address already in use :::3000 +2ms
(node:13804) UnhandledPromiseRejectionWarning: Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (net.js:1331:16)
at listenInCluster (net.js:1379:12)
at Server.listen (net.js:1465:7)
at ExpressAdapter.listen (D:\nest\demo100\node_modules\@nestjs\platform-express\adapters\express-adapter.js:78:32)
at D:\nest\demo100\node_modules\@nestjs\core\nest-application.js:167:46
at new Promise (
at NestApplication.listen (D:\nest\demo100\node_modules\@nestjs\core\nest-application.js:156:16)
at bootstrap (D:\nest\demo100\src\main.ts:6:3)(Use `node --trace-warnings ...` to show where the warning was created)(node:13804) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13804) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
可能部分百度是这样说的,是端口错误,百度说的没有错,就是端口被占用了
于是你输入了指令
netstat -ano|findstr 3000
taskkill /pid 14236
然后你发现终止失败,没有权限等
其实这种情况你输入
taskkill /f /pid 14236就行了 记住端口号自己改
另外就是有可能有的电脑权限不一样,你可以尝试用vscode以管理员权限进行开启软件,这种情况看个人了,还是看你们具体情况而定,希望能帮到你们,本人笔记