TypeError:e不是函数|角度7

时间:2019-02-12 07:47:13

标签: angular typescript

在环境中将production属性更改为true后,我收到了TypeError: e is not a function。仅当我尝试访问特定路由时,它才会发生。 www.example.com有效,www.example.com/member无效。在正常和延迟加载的模块上均会发生此错误。将production设置为false,一切正常。

main.js中发生错误,我们可以清楚地看到错误为e is not a function

function D() {
            for (var t = [], e = 0; e < arguments.length; e++)
                t[e] = arguments[e];
            return function(e) {
                if (0 === t.length)
                    return e;
                var n = t[t.length - 1];
                return t.slice(0, -1).reduceRight(function(t, e) {
                    return e(t)
                }, n(e))
            }
        }

依赖项:

  "dependencies": {
    "@angular/animations": "^7.1.1",
    "@angular/cdk": "^7.1.0",
    "@angular/common": "^7.1.1",
    "@angular/compiler": "^7.1.1",
    "@angular/core": "^7.1.1",
    "@angular/forms": "^7.1.1",
    "@angular/http": "^7.1.1",
    "@angular/material": "^7.1.0",
    "@angular/platform-browser": "^7.1.1",
    "@angular/platform-browser-dynamic": "^7.1.1",
    "@angular/router": "^7.1.1",
    "@ngrx/effects": "^6.1.0",
    "@ngrx/router-store": "^6.1.0",
    "@ngrx/store": "^6.1.0",
    "@ngrx/store-devtools": "^6.1.0",
    "@ngx-translate/core": "^10.0.2",
    "@ngx-translate/http-loader": "^3.0.1",
    "@types/npm": "^2.0.29",
    "amazing-time-picker": "^1.5.3",
    "auth0-js": "^9.7.3",
    "base-64": "^0.1.0",
    "core-js": "^2.5.4",
    "css-reset-and-normalize-sass": "^0.1.2",
    "file-saver": "^2.0.0-rc.4",
    "fs-extra": "^7.0.0",
    "moment": "^2.22.2",
    "ngrx-store-localstorage": "^5.0.1",
    "ngx-material-timepicker": "^2.8.4",
    "ngx-tui-calendar": "^0.1.3",
    "rxjs": "^6.0.0",
    "rxjs-compat": "^6.3.2",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  }

我认为缩小有问题。我使用ng build --prod构建了该应用程序。打字稿版本为3.1.6

0 个答案:

没有答案