WebSockets request was expected error when using --inspect-brk option
问题 When I run nodemon dist/server/app.js it works on default port 3000 and I'm able to reach my API. But if I run nodemon --inspect-brk=localhost:3000 dist/server/app.js , I got error saying "WebSockets request was expected". What's wrong? 回答1: You can't run your web server and the debugger on the same port. They are each separate servers (the debugger is a server built into the node.js runtime). So, you can either remove the port and host designation from the --inspect-brk option and just let