当前位置:网站首页>Solve the problem of running server nodemon reporting errors

Solve the problem of running server nodemon reporting errors

2022-06-13 04:18:00 Hunterst_

[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node scr.js`
node:events:498
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::9000
    at Server.setupListenHandle [as _listen2] (node:net:1330:16)
    at listenInCluster (node:net:1378:12)
    at Server.listen (node:net:1465:7)
    at Object.<anonymous> (C:\Users\HUAWEI\Desktop\webfuwu\scr.js:8:8)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1357:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -4091,
  syscall: 'listen',
  address: '::',
  port: 9000
}
[nodemon] app crashed - waiting for file changes before starting...
 Usage: nodemon [nodemon options] [script.js] [args]

  See "nodemon --help" for more.


C:\Users\HUAWEI\Desktop\webfuwu>

Generally, it is because of permission problems

Windows Power Shell

Find the command window , It's a blue command window , Higher authority than black

And then run it ok

原网站

版权声明
本文为[Hunterst_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280523598319.html