Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Problem with starting a server #304

Closed
SvDen opened this issue Feb 15, 2016 · 16 comments
Closed

Problem with starting a server #304

SvDen opened this issue Feb 15, 2016 · 16 comments

Comments

@SvDen
Copy link

SvDen commented Feb 15, 2016

I tried to learn the 1-st step from angular tutorial but I couldn't even start a server.
It starts normally, but when I am going to visit http://127.0.0.1:8000/ it throws me an error. I attached debug.txt here.
Help me please.

npm-debug.txt

@SvDen SvDen closed this as completed Feb 16, 2016
@SvDen SvDen reopened this Feb 17, 2016
@SvDen
Copy link
Author

SvDen commented Feb 17, 2016

Still important.
I updated all of modules include http-server but it changes nothing.
https://gyazo.com/e967ccb1c34065d4b5dbb30fc2652dc1

@ghost
Copy link

ghost commented Feb 17, 2016

I've got the same problem.

npm-start -> starting up http-server, available.

but when trying to connect via chrome or ff:

_http_outgoing.js:351
throw new TypeError('The header content contains invalid characters');

I've updated http-server and karma. That didn't help.

@SvDen
Copy link
Author

SvDen commented Feb 17, 2016

That didn't help me too.

But I got another solution, step by step:

  1. cd /path/to/your/app
  2. install 'npm i -g lite-server'
  3. run 'lite-server' being in the /app directory.

I hope it helps you. Not what I expected, but still working.

@ghost
Copy link

ghost commented Feb 18, 2016

Thank you very much SvDen.

lite-server is the solution I was lookin for!

@incaib
Copy link

incaib commented Feb 18, 2016

Can view a sample Of header, html sended to server?
El 17/02/2016 18:50, "portfolio-examples" notifications@github.com
escribió:

I've got the same problem.

npm-start -> starting up http-server, available.

but when trying to connect via chrome or ff:

_http_outgoing.js:351
throw new TypeError('The header content contains invalid characters');

I've updated http-server and karma. That didn't help.


Reply to this email directly or view it on GitHub
#304 (comment)
.

@ghost
Copy link

ghost commented Feb 19, 2016

Im not sure if thats what you asking for (lines with '>'):

http://imgur.com/pg8TutE

@Toisen
Copy link

Toisen commented Feb 28, 2016

Same problem here. Thanks for lite-server solution, but I still don't know how to make protractor to find what it needs. I changed a port of baseUrl parameter in default config to 3000 (lite-server runs at it) but protractor still can't get index.html

@igoradamenko
Copy link

Right now npm install http-server -D fixes it for me.

More info in PR: #311

@lhy234
Copy link

lhy234 commented Mar 15, 2016

@igoradamenko i tried ‘npm install http-server -D ’,but it doesn't work. had the latest http-server version
solved the problem ?

@igoradamenko
Copy link

@braveliuchina It's interesting. Are you sure about the version of http-server? Try to check out this issue.

@lhy234
Copy link

lhy234 commented Mar 16, 2016

@igoradamenko thanks .i solved this problem by changing the version of http-server in package.json.

@MocYang
Copy link

MocYang commented Mar 18, 2016

I update http-server to 0.9.0.Then change the package.json file .Now everything goes well.

@Doubl3
Copy link

Doubl3 commented Mar 30, 2016

Upgrading the http-server dependency to 0.9.0 seems to fix the pb. Thank you @igoradamenko & @MocYang !

This issue could now be closed, if somebody still contributes to this tutorial.

@gkalpak
Copy link
Member

gkalpak commented Mar 30, 2016

Thx for getting back.
I will leave this open, as in its current state the tutorial fails (i.e. the user needs to update the dependency themselves).

I am about to submit a PR that will take care of that (among other stuff), as well as bring the tutorial up to speed with angular v1.5.
I'll close this when it lands.

gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved in the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, I have tested with the following versions on Node (on Windows 10) and everything seems to work fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved in the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 12, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
@kuznets
Copy link

kuznets commented May 24, 2016

I have problem with start node.js (node v4.4.4 http-server 0.9.0)
First start pass is good, node start and browser display angular-phonecat page.
Then I resets workspace to step 0, start node end get errors.
console log:


$ npm start
angular-phonecat@0.0.0 prestart D:\NodeJs\angular-phonecat
npm install

angular-phonecat@0.0.0 postinstall D:\NodeJs\angular-phonecat
bower install

angular-phonecat@0.0.0 start D:\NodeJs\angular-phonecat
http-server -a 0.0.0.0 -p 8000

events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8000
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at net.js:1379:9
at nextTickCallbackWith3Args (node.js:453:9)
at process._tickCallback (node.js:359:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
at node.js:968:3

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! angular-phonecat@0.0.0 start: http-server -a 0.0.0.0 -p 8000
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-phonecat@0.0.0 start script 'http-server -a 0.0.0.0 -p 8000'.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! http-server -a 0.0.0.0 -p 8000
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-phonecat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\NodeJs\angular-phonecat\npm-debug.log


and npm-debug.log

How to repair it?

npm-debug.txt

@gkalpak
Copy link
Member

gkalpak commented May 24, 2016

@kuznets, this mrans that the first instance is still running and bound to pirt 8000, so the port is not available for the second instance to bind to.
You can't have more than one instances running at the same time - make sure the first one has been stopped properly.

gkalpak added a commit that referenced this issue May 24, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) #289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes #198
Fixes #214
Fixes #224
Fixes #230
Fixes #243
Fixes #246
Fixes #252
Fixes #277
Fixes #286
Fixes #295
Fixes #303
Fixes #304
Fixes #323
Fixes #324

Closes #268
Closes #270
Closes #278
Closes #280
Closes #289
Closes #309
Closes #311
Closes #319
gkalpak added a commit that referenced this issue May 24, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) #289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes #198
Fixes #214
Fixes #224
Fixes #230
Fixes #243
Fixes #246
Fixes #252
Fixes #277
Fixes #286
Fixes #295
Fixes #303
Fixes #304
Fixes #323
Fixes #324

Closes #268
Closes #270
Closes #278
Closes #280
Closes #289
Closes #309
Closes #311
Closes #319
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants