我試圖瞭解typscript和angular2遵循https://angular.io/guide/quickstart。Typescript 5分鐘教程與angular2休息得到
我通過各種步驟去,但最後一步npm start
結果在下面的錯誤
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
有沒有人也有類似的經歷嗎?
感謝
我實際上沒有看到任何服務器錯誤這裏一邊從Not Found錯誤這是一個客戶端錯誤不管怎麼說,這與當前信息你給是不可能找出根本原因。這讓我想問問你的index.html文件是否存在於正確的位置,或者如果你從包含它的目錄啓動npm服務器? –
你是正確的烏鴉。 index.html位於應用程序文件夾中,而不在根文件夾中。將它移動到根文件夾並運行命令顯示網頁。 –
你能否提供你的項目(文件夾,文件,...)的結構?謝謝! –