ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Debugging VSCode error #449

Closed saniko closed 7 years ago

saniko commented 7 years ago

Hi, I'm getting the Error: listen EADDRINUSE :::1337 when running the build in VSCode node debugger.

I have followed @lucianlature instructions here 347 { "type": "node", "request": "launch", "name": "Launch ReactUniversally", "program": "${workspaceRoot}/build/server/index.js", "cwd": "${workspaceRoot}" }

What am I doing wrong?

Thanks.

elektronik2k5 commented 7 years ago

@saniko EADDRINUSE is node's way of telling you the port you are trying to bind to (listen to) is already in use. Make sure to kill any conflicting processes listening on the same port.

saniko commented 7 years ago

Had to add this to debug configuration: ` "configurations": [

        {     "type": "node",
            "request": "launch",
            "name": "Launch siteBuilder",
            "program": "${workspaceRoot}/build/server/index.js",
            "protocol": "inspector",
            "cwd": "${workspaceRoot}"
        },
         {
        "name": "Attach",
        "type": "node",
        // Port to attach to.
        "port": 5858
    }`
ctrlplusb commented 7 years ago

Thanks for reporting back with the fix @saniko ❤️