Angular 类型错误:e不是函数|角度7
在环境中将Angular 类型错误:e不是函数|角度7,angular,typescript,Angular,Typescript,在环境中将production属性更改为true后,我收到TypeError:e不是函数。只有当我尝试访问特定路径时才会发生这种情况,例如www.example.com有效,www.example.com/member无效。此错误在正常加载模块和延迟加载模块上都会发生。当production设置为false时,一切正常 main.js中出现错误,我们可以清楚地看到错误,因为e不是一个函数: function D() { for (var t = [], e = 0; e
production
属性更改为true
后,我收到TypeError:e不是函数
。只有当我尝试访问特定路径时才会发生这种情况,例如www.example.com
有效,www.example.com/member
无效。此错误在正常加载模块和延迟加载模块上都会发生。当production
设置为false
时,一切正常
main.js中出现错误,我们可以清楚地看到错误,因为e不是一个函数
:
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))
}
}
我相信缩小是有问题的。我用
ng build--prod
构建了这个应用程序。Typescript版本是3.1.6
为什么不使用Typescript v3.3.3?没有更新,仅此而已,没有具体原因。然后尝试使用它…@MassiveCodes Angular compiler需要版本LuL?没有在这里工作过angular和ts 3.3.3为什么不使用TypeScript v 3.3.3?没有更新,仅此而已,没有具体原因。然后尝试使用它…@MassiveCodes angular编译器需要版本LuL?不,我也在这里工作,角度和ts 3.3.3
"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"
}