第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何從 Go HTTP Server 提供 Angular 應(yīng)用程序?

如何從 Go HTTP Server 提供 Angular 應(yīng)用程序?

Go
牛魔王的故事 2022-04-26 10:35:45
我正在嘗試從用 Go 編寫(xiě)的服務(wù)器提供 Angular 應(yīng)用程序(Angular 8.2.14)。環(huán)顧四周,我發(fā)現(xiàn)了下面的片段,據(jù)說(shuō)它可以解決問(wèn)題。func main() {    http.ListenAndServe(":4000", http.FileServer(http.Dir(folderDist)))}其中folderDist是我構(gòu)建應(yīng)用程序的目錄。在我的示例中導(dǎo)航到 localhost:4000 時(shí),我在瀏覽器上收到以下錯(cuò)誤:runtime-es2015.js:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.styles-es2015.js:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.main-es2015.js:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.polyfills-es2015.js:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.vendor-es2015.js:1 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.我錯(cuò)過(guò)了什么?我已經(jīng)嘗試過(guò)這里建議的解決方案,但錯(cuò)誤仍然相同。
查看完整描述

1 回答

?
DIEA

TA貢獻(xiàn)1820條經(jīng)驗(yàn) 獲得超2個(gè)贊

解決了。

顯然,Angular 8 的某些版本中存在錯(cuò)誤...

編輯tsconfig.json文件并將“target”行更改為“es5”。

"target": "es5",

制作“ng build”。

完畢!


查看完整回答
反對(duì) 回復(fù) 2022-04-26
  • 1 回答
  • 0 關(guān)注
  • 148 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)