【发布时间】:2018-12-22 06:03:40
【问题描述】:
我目前正在从 Angular 4.x 升级到 5.x 并遇到以下错误:
main.81bcdf404dc22078865d.bundle.js:1 Uncaught TypeError: i.splitHash is not a function
at Object.t.parseUrl (main.81bcdf404dc22078865d.bundle.js:1)
at t.path (main.81bcdf404dc22078865d.bundle.js:1)
at e.<anonymous> (main.81bcdf404dc22078865d.bundle.js:1)
at e.V9yc.t.UrlRouter.e.sync (main.81bcdf404dc22078865d.bundle.js:1)
at bs (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at vt (main.81bcdf404dc22078865d.bundle.js:1)
at main.81bcdf404dc22078865d.bundle.js:1
at new e (main.81bcdf404dc22078865d.bundle.js:1)
at Object.Dt [as createNgModuleRef] (main.81bcdf404dc22078865d.bundle.js:1)
如果我执行 'ng lint' 我会通过,'ng build --prod' 我会通过,'ng serve' 我会通过。但是当我执行“ng serve --prod”时,我在运行时收到此错误,我无法弄清楚是什么原因造成的。我认为这可能是一个 ui-router 版本问题,但升级到 "@uirouter/angular": "1.0.0-rc.1"(以及它下面的所有版本)并没有做任何事情。有没有其他人遇到过这个问题?
【问题讨论】:
-
如果我们找到解决方案,我会发布解决方案。但现在我们一直停留在 Angular 4 上,直到我们弄清楚升级。
标签: typescript npm angular-cli package.json angular5