每次部署后Angular应用程序需要浏览器刷新

时间:2018-04-26 20:57:53

标签: angular

我们的Angular应用程序每次部署到生产和QA Web服务器后都会出现问题。部署之后,应用程序无法运行,直到您按 CTRL -Refresh。我们在使用ng-build时尝试了不同的开关,包括" - 输出散列全部"选项。

我们目前正在运营: Angular CLI:1.7.4 节点:6.10.3 Angular:5.2.3

目前我们正在使用" ng build --prod --env = qa"。我们在控制台中看到的第一个错误总是" Uncaught SyntaxError:Unexpected token<"。

在我粘贴下面的其余错误之前,想要指出CTRL-Refresh总是解决这个问题而没有其他操作,但要求我们的用户记住点击 CTRL -Refresh每天早上,我们按照每日部署时间表。任何帮助深表感谢!以下是控制台的其余错误:

main.2ef68a54d7f9448f51b4.bundle.js:1 ERROR Error: Uncaught (in promise): Error: Loading chunk 0 failed.
Error: Loading chunk 0 failed.
    at HTMLScriptElement.b (inline.3d41eb1ccb98ee445ffc.bundle.js:1)
    at HTMLScriptElement.E (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at Object.onInvokeTask (main.2ef68a54d7f9448f51b4.bundle.js:1)
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.runTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.invokeTask [as invoke] (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at y (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at HTMLScriptElement.b (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at HTMLScriptElement.b (inline.3d41eb1ccb98ee445ffc.bundle.js:1)
    at HTMLScriptElement.E (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at Object.onInvokeTask (main.2ef68a54d7f9448f51b4.bundle.js:1)
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.runTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.invokeTask [as invoke] (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at y (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at HTMLScriptElement.b (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at P (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at P (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at polyfills.81eb2d8b886832be573a.bundle.js:1
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at Object.onInvokeTask (main.2ef68a54d7f9448f51b4.bundle.js:1)
    at t.invokeTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.runTask (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at v (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at e.invokeTask [as invoke] (polyfills.81eb2d8b886832be573a.bundle.js:1)
    at y (polyfills.81eb2d8b886832be573a.bundle.js:1)
K @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.handleError @ main.2ef68a54d7f9448f51b4.bundle.js:1
next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.object.r @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.__tryOrUnsub @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.emit @ main.2ef68a54d7f9448f51b4.bundle.js:1
(anonymous) @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.invoke @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.run @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.runOutsideAngular @ main.2ef68a54d7f9448f51b4.bundle.js:1
onHandleError @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.handleError @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.runGuarded @ polyfills.81eb2d8b886832be573a.bundle.js:1
t @ polyfills.81eb2d8b886832be573a.bundle.js:1
n.microtaskDrainDone @ polyfills.81eb2d8b886832be573a.bundle.js:1
v @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.invokeTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
y @ polyfills.81eb2d8b886832be573a.bundle.js:1
b @ polyfills.81eb2d8b886832be573a.bundle.js:1
error (async)
O @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.scheduleTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
onScheduleTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.scheduleTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.scheduleTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.scheduleEventTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
(anonymous) @ polyfills.81eb2d8b886832be573a.bundle.js:1
O.o.set @ polyfills.81eb2d8b886832be573a.bundle.js:1
a.e @ inline.3d41eb1ccb98ee445ffc.bundle.js:1
r @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.loadFactory @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.load @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.loadModuleFactory @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.load @ main.2ef68a54d7f9448f51b4.bundle.js:1
(anonymous) @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._tryNext @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t._trySubscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
PIsA.e.a @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._innerSub @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._tryNext @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t._trySubscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
PIsA.e.a @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._innerSub @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._tryNext @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e.next @ main.2ef68a54d7f9448f51b4.bundle.js:1
e._subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t._trySubscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.call @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.subscribe @ main.2ef68a54d7f9448f51b4.bundle.js:1
(anonymous) @ main.2ef68a54d7f9448f51b4.bundle.js:1
t @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.forEach @ main.2ef68a54d7f9448f51b4.bundle.js:1
(anonymous) @ main.2ef68a54d7f9448f51b4.bundle.js:1
t @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.runNavigate @ main.2ef68a54d7f9448f51b4.bundle.js:1
(anonymous) @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.invoke @ polyfills.81eb2d8b886832be573a.bundle.js:1
onInvoke @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.invoke @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.run @ polyfills.81eb2d8b886832be573a.bundle.js:1
(anonymous) @ polyfills.81eb2d8b886832be573a.bundle.js:1
t.invokeTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
onInvokeTask @ main.2ef68a54d7f9448f51b4.bundle.js:1
t.invokeTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.runTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
v @ polyfills.81eb2d8b886832be573a.bundle.js:1
e.invokeTask @ polyfills.81eb2d8b886832be573a.bundle.js:1
y @ polyfills.81eb2d8b886832be573a.bundle.js:1
b @ polyfills.81eb2d8b886832be573a.bundle.js:1
5.17c21d79043279ea6b1f.chunk.js:1 Uncaught SyntaxError: Unexpected token <

0 个答案:

没有答案