Angular 5 - TypeError:Array.from不是函数

时间:2018-05-05 04:58:37

标签: angular

您好我正在尝试调试Angular 5应用程序构建以进行生产。现在我正在运行构建工件,包括sourcemaps,我正在使用命令

构建角度应用程序

build --prod --env=prod --build-optimizer --sourcemaps

比我有这样的堆栈登录到appinsights

            TypeError: this._results.find is not a function
    at e.find (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:70596)
    at n._syncDescribedByIds (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:1318967)
    at n._next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:1316635)
    at n.__tryOrSetError (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:36100)
    at n.next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:35211)
    at n._next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:34345)
    at n.next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:34016)
    at n.notifyNext (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:39157)
    at n._next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:36623)
    at n.next (https://gilitickets.azureedge.net/bookingapp-live/20180503.2/main.8ea73b7f474a1fff0865.bundle.js:1:34016)

并感谢npm包sourcemapped-stacktrace

我可以追溯到

    TypeError: Array.from is not a function
    at find (webpack:///node_modules/@angular/core/esm5/core.js.pre-build-optimizer.js:6336:29)
    at find (webpack:///node_modules/@angular/material/esm5/form-field.es5.js.pre-build-optimizer.js:607:39)
    at _syncDescribedByIds (webpack:///node_modules/@angular/material/esm5/form-field.es5.js.pre-build-optimizer.js:400:18)
    at call (webpack:///node_modules/rxjs/_esm5/Subscriber.js.pre-build-optimizer.js:249:15)
    at __tryOrSetError (webpack:///node_modules/rxjs/_esm5/Subscriber.js.pre-build-optimizer.js:189:26)
    at next (webpack:///node_modules/rxjs/_esm5/Subscriber.js.pre-build-optimizer.js:128:25)
    at _next (webpack:///node_modules/rxjs/_esm5/Subscriber.js.pre-build-optimizer.js:92:17)
    at next (webpack:///node_modules/rxjs/_esm5/operators/mergeMap.js.pre-build-optimizer.js:151:29)
    at notifyNext (webpack:///node_modules/rxjs/_esm5/InnerSubscriber.js.pre-build-optimizer.js:25:20)
    at _next (webpack:///node_modules/rxjs/_esm5/Subscriber.js.pre-build-optimizer.js:92:17)

这是我不理解的部分。为什么构建优化器可以在浏览器的正常运行期间抛出异常。有人可以告诉我我错过了什么吗?或者为什么我从webpack而不是我的代码中看到stacktrace?

0 个答案:

没有答案