0

hello i am trying to learn angular framework with a udemy course. by following the course i am trying to run the server so i can display things in node js cmd line . when i run ng serve to run the server i am getting this socket closed error. see below pic. i am running windows 10 64 bit acer laptop. i have bracket editor,sublime . i dont know if any of these is interfering

enter image description here

5 Answers 5

2

I had this problem too, there is a new Node Version now (v7.2.0), I've updated, and it's working fine now.

Sign up to request clarification or add additional context in comments.

1 Comment

Wesley, actually it is a bug fixed at v 7.2, so you're right about that
1

The problem seems to be related to the node version you are using v7.1.0. Uninstall node and install a prior node version for example v6.9.1. Install angular-cli again and then run your project again.

1 Comment

yup that was it. reinstalled to previous and it works now
1

If you're using windows, i suggest you:

install chocolatey here: https://chocolatey.org/install, so you can easily install packages like nodejs with the command line.

Open a command prompt in admin mode and finally do:

> choco upgrade nodejs.install

Comments

0

I know this sounds silly, but try closing your terminal (all of them) then open up a new terminal and make sure you DON'T RESIZE the terminal window... then try it again.

could possibly be this same bug: https://github.com/npm/npm/issues/12887

1 Comment

sorry to hear that :(
0

Try running ng serve using a different port:

ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.