Rob Rob - 1 year ago 169
AngularJS Question

Angular 2 Tutorial on OS X El Capitan Returns "Cannot GET /" in browser

I'm trying to get through the Angular 2 with TypeScript on OS X. I have followed the tutorial and received no errors when compiled. The

npm start
command completed successfully and a new tab was displayed in Safari. The address is
the only thing that showed was

Cannot GET /

I am not familiar with Lite-Server and I don't know if I've failed to start something to get the tutorial running.

Is there something I've missed or some way to determine if the Lite-Server is running?

Answer Source

I suspect your folder/file structure might be confusing lite-server.

lite-server will look for a bs-config.json file. This should be at the same level as your node_modules folder.

Here is the github page for lite-servier.

For example, to change the server port, watched file paths, and base directory for your project, create a bs-config.json in your project's folder:


  "port": 8000,
  "files": ["./src/**/*.{html,htm,css,js}"],
  "server": { "baseDir": "./src" }