bikeman868 bikeman868 - 5 months ago 49
AngularJS Question

I can not get the Angular 2 quick-start tutorial to run

I am brand new to Angular and decided to start with the quickstart tutorial https://angular.io/docs/ts/latest/quickstart.html I have completed all the steps and also been back and double checked all my files are exactly as shown in the tutorial, but I can not get it to work and have no idea where to start to fix the problem.

I am running on Windows 10. I downloaded and installed the latest stable build of Node (v4.4.7) and NPM (2.15.8). They seem to run just fine. After I type

npm start
my
ts
files get transpiled into
js
files and the browser opens, but the browser displays "Cannot GET /" instead of displaying the quickstart app, and Fiddler shows me that the server returned a 404 error.

The address bar in my browser contains
http://localhost:3000/


In my command window the server outputs a line of text each time I refresh my browser, so they are talking to each other. This is an example of one of the lines output to the console window
[1] 16.07.04 15:43:09 404 GET /index.html
.

Where do I start to figure out what's going on?

Answer

In your link it says:

Verify that you are running at least node v5.x.x and npm 3.x.x by running node -v and npm -v in a terminal/console window. Older versions produce errors.

I'm running node 6.2.1 and I was able to reproduce everything in the tutorial a few weeks back when I started with Angular 2.

The latest seems to be 6.2.2. See here: https://nodejs.org/en/download/current/