Answer the question
In order to leave comments, you need to log in
How to overcome the error when starting the angular server?
I ran into such a problem: when I try to at least start going through the https://docs.angularjs.org/tutorial tutorial , my server gives an error. I do everything step by step: first "git clone --depth=14 https://github.com/angular/angular-phonecat.git ", then "npm install" and then "npm start". Everything seems to be working fine:
D:\Web dev\AngularJS learning\angular-phonecat>npm start
> [email protected] prestart D:\Web dev\AngularJS learning\angular-phonecat
> npm install
> [email protected] postinstall D: \Web dev\AngularJS learning\angular-phonecat
> bower install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
> [email protected] start D:\Web dev\AngularJS learning\angular-phonecat
> http-server -a 0.0.0.0 -p 8000
Starting up http-server, serving ./ on port: 8000
[Tue, 16 Feb 2016 16:59:59 GMT] "GET /app/index.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101
Firefox/44.0"
_http_outgoing.js:348
throw new TypeError('The header content contains invalid characters');
^
TypeError: The header content contains invalid characters
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:348:11)
at ResponseStream.(anonymous function) [as setHeader] (D:\Web dev\AngularJS learning\angular-phonecat\node_modul
es\union\lib\response-stream.js:86:34)
at serve (D:\Web dev\AngularJS learning\angular-phonecat\node_modules\ecstatic\lib\ecstatic.js:146:11)
at D:\Web dev\AngularJS learning\angular-phonecat\node_modules\ecstatic\lib\ecstatic.js:139:9
at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
"start"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `http-server -a 0.0.0.0 -p 8000`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'http-server -a 0.0.0.0 -p 8000'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 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:\Web dev\AngularJS learning\angular-phonecat\npm-debug.log
Answer the question
In order to leave comments, you need to log in
try another webserver. their blessings are like dirt. light-http for example
It seems to me that the problem is really in the node, since it says: npm WARN notsup Not compatible with your operating system or architecture: [email protected]
Since you have Windows, download the installer from the node's site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question