Reputation: 5715
I am attempting to understand typscript and angular2 by following the https://angular.io/guide/quickstart.
I went through the various steps but the last step npm start
result in the following errors
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
J:\workspace\epimss\typescript\angular2-quickstart>npm start
> [email protected] start J:\workspace\epimss\typescript\angular2-quickstart
> concurrently "npm run tsc:w" "npm run lite"
[0]
[0] > [email protected] tsc:w J:\workspace\epimss\typescript\angular2-quickstart
[0] > tsc -w
[0]
[1]
[1] > [email protected] lite J:\workspace\epimss\typescript\angular2-quickstart
[1] > lite-server
[1]
[0] 7:51:31 PM - Compilation complete. Watching for file changes.
[1] Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
[1] ** browser-sync options **
[1] { injectChanges: false,
[1] files: [ './**/*.{html,htm,css,js}' ],
[1] server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[1] [BS] Access URLs:
[1] ------------------------------------
[1] Local: http://localhost:3000
[1] External: http://192.168.2.4:3000
[1] ------------------------------------
[1] UI: http://localhost:3001
[1] UI External: http://192.168.2.4:3001
[1] ------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files...
[1] 16.03.09 19:51:36 404 GET /index.html
[1] 16.03.09 19:51:37 404 GET /favicon.ico
[1] 16.03.09 19:51:38 404 GET /favicon.ico
Has anyone has a similar experience?
Thanks
Upvotes: 0
Views: 1768
Reputation: 3738
After you finish the tutorial you will get a folder structure like in the picture below, now for lite-server to serve from app and node_modules folders you need to add a bs-config.json file in angular2-quickstart folder.
{
"port": 3000,
"files": ["/app/**/*.{html,htm,css,js}"],
"server": { "baseDir": ["./app"],
"routes": {
"/node_modules": "node_modules" , "/app": "app", "/app.component": "app"
}
}
}
Upvotes: 3
Reputation: 251142
[1] [BS] Serving files from: ./
Followed by
[1] 16.03.09 19:51:36 404 GET /index.html
[1] 16.03.09 19:51:37 404 GET /favicon.ico
Just means that those files (index.html
, favicon.ico
) are not in that location (./
).
You'll need to browse to the location that does contain those files, or move those files to the location you are browsing.
Upvotes: 1