Hi ! Can some one give me some guidance to correct this issue ? The App runs fines in developpment and crashes when deployed.
I'm using ASP.NET CORE & Angular V.6.0.0.
From IIS I can start the backend and it runs ok.
But when I launch the app from the browser, here is the error I get this error :
main.6b917b420639c862ad7c.js:1 ERROR SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at XMLHttpRequest.o.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (main.6b917b420639c862ad7c.js:1)
at XMLHttpRequest.E (polyfills.c60318e761d83ed91d05.js:1)
at t.invokeTask (polyfills.c60318e761d83ed91d05.js:1)
at Object.onInvokeTask (main.6b917b420639c862ad7c.js:1)
at t.invokeTask (polyfills.c60318e761d83ed91d05.js:1)
at e.runTask (polyfills.c60318e761d83ed91d05.js:1)
at e.invokeTask [as invoke] (polyfills.c60318e761d83ed91d05.js:1)
at m (polyfills.c60318e761d83ed91d05.js:1)
at XMLHttpRequest.b (polyfills.c60318e761d83ed91d05.js:1)
Appconfig.json :
{
"remoteServiceBaseUrl": "http://localhost:22770",
"appBaseUrl": "http://localhost:4230",
"localeMappings": [
{
"from": "pt-BR",
"to": "pt"
},
{
"from": "zh-CN",
"to": "zh"
},
{
"from": "he-IL",
"to": "he"
}
]
}
appconfig.production.json
"remoteServiceBaseUrl": "http://localhost:22770",
"appBaseUrl": "http://localhost:4230",
"localeMappings": [
{
"from": "pt-BR",
"to": "pt"
},
{
"from": "zh-CN",
"to": "zh"
},
{
"from": "he-IL",
"to": "he"
}
]
}
6 Answer(s)
-
0
hi
Your appconfig.production.json file json format is incorrect. Missing part at the beginning {
-
0
Hi @maliming,
Sorry the file has this opening { , I just missed it when copying.
appconfig.production.json
{ "remoteServiceBaseUrl": "http://localhost:22770", "appBaseUrl": "http://localhost:4230", "localeMappings": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" } ] }
-
0
please share the browser console/network panel with the error as well.
-
0
I also have this same issue with the latest version v8.0 in production. Kindly share the solution please.
-
0
hi @A4amen Please create a new question and describe your problem in detail. Thank you
-
0
I also have the same issue as recomended above . I created a new question.