更新时间:2023-11-18 17:43:40
更新 m很确定这是你的问题:
Update: I'm pretty sure this is your problem:
节点--debug bin / www然后启动node-debugger bin / www。 p>
node --debug bin/www and then start the node-debugger bin/www.
不要做那些 BOTH 。这是一个或另一个。他们是做同样事情的两种方式。无论您是否使用节点检查器,我都喜欢以前的方法,因为它更简单,并且与节点本身一起使用。
Don't do BOTH of those. It's one or the other. They are 2 ways of doing the same thing. I prefer the former way as it's simpler and works with node itself whether or not you are using node-inspector.
总结:
node-debug bin / www
在调试模式下启动您的应用程序,并在同一进程中启动节点检查器节点--debug bin / www
以调试模式启动您的应用程序。这应该与单独的终端窗口组合,您可以单独运行 node-inspector
作为单独的进程。我推荐这种方法,但是应该可以使用。node-debug bin/www
starts both your app in debug mode AND node-inspector in the same processnode --debug bin/www
starts your app in debug mode. This should be combined with a separate terminal window where you run node-inspector
as a separate process. I recommend this approach, but either should work.这是我的建议,这个。尝试使用最简单的命令形式来运行:
Here's my suggestion to start troubleshooting this. Try to use the simplest form of the commands to get everything running:
节点的前台,--debug ./bin/www
sudo netstat -ntlp
以查看它是哪个进程,了解它是什么,为什么它正在运行,然后杀死它以释放端口杀死< pid-you-got-from-netstat>
node --debug ./bin/www
sudo netstat -ntlp
to see which process it is, comprehend what it is and why it is running, and then kill it to free up the port kill <pid-you-got-from-netstat>