我似乎无法跟踪nodemon在加载其依赖项并启动后崩溃的原因。我正在做一个MEAN API教程,我想用它来自动重启节点服务器。任何帮助将不胜感激。这是堆栈跟踪:
C:\nodeprojects\bookstore>npm install -g nodemon
C:\Users\brohj_000\AppData\Roaming\npm\nodemon -> C:\Users\brohj_000\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js
> nodemon@1.14.11 postinstall C:\Users\brohj_000\AppData\Roaming\npm\node_modules\nodemon
> node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donat
e\u001b[0m\n')" || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ nodemon@1.14.11
added 247 packages in 103.866s
C:\nodeprojects\bookstore>nodemon
[nodemon] 1.14.11
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
Running on port 3000...
(node:6748) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See
http://mongoosejs.com/docs/connections.html#use-mongo-client
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (C:\nodeprojects\bookstore\node_modules\express\lib\application.js:618:24)
at Object.<anonymous> (C:\nodeprojects\bookstore\app.js:15:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
[nodemon] app crashed - waiting for file changes before starting...