[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>
一般是因为权限问题
Windows Power Shell
找到这个命令窗口,是蓝色命令窗口,比黑色的权限高
然后运行就ok
|