在角8中,当我上传生成错误时会发生
错误:-
polyfills-es2015.db074f152f5fbfd29825.js:1 Uncaught TypeError: Cannot set property 'true' of undefined
at Object.6dTf (polyfills-es2015.db074f152f5fbfd29825.js:1)
at a (runtime-es2015.30fc626ba611e35f5ac3.js:1)
at Module.hN/g (polyfills-es2015.db074f152f5fbfd29825.js:1)
at a (runtime-es2015.30fc626ba611e35f5ac3.js:1)
at Object.1 (polyfills-es2015.db074f152f5fbfd29825.js:1)
at a (runtime-es2015.30fc626ba611e35f5ac3.js:1)
at t (runtime-es2015.30fc626ba611e35f5ac3.js:1)
at Array.r [as push] (runtime-es2015.30fc626ba611e35f5ac3.js:1)
at polyfills-es2015.db074f152f5fbfd29825.js:1如何解决此错误。
环境:-
Angular CLI: 8.0.1
Node: 10.15.3
OS: linux x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.1
@angular-devkit/build-angular 0.800.1
@angular-devkit/build-optimizer 0.800.1
@angular-devkit/build-webpack 0.800.1
@angular-devkit/core 8.0.1
@angular-devkit/schematics 8.0.1
@angular/cli 8.0.1
@angular/http 7.2.15
@ngtools/webpack 8.0.1
@schematics/angular 8.0.1
@schematics/update 0.800.1
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0我被用来构建--prod --aot --构建优化器命令来构建应用程序。
发布于 2019-07-30 05:30:04
web-animations-js发布了2.3.2,其中包括了对角度8错误的修正
发布于 2019-06-05 12:17:43
问题来自于web-animations-js.
从角度6开始,它就不再需要了。
我们已经更新了动画的实现,使之不再需要网络动画的填充。这意味着您可以从您的应用程序中删除这个多边形填充,并节省大约47 at的包大小,同时提高Safari中的动画性能。
https://angular.io/guide/browser-support#enabling-polyfills
从polyfills.ts中删除导入:
import 'web-animations-js';并从您的package.json中删除“web动画-js”:
"web-animations-js": "^2.3.1"这解决了我的问题。
来自角的当前polyfills.ts不再包含它:https://github.com/angular/angular/blob/master/aio/src/polyfills.ts
发布于 2019-06-04 09:10:58
角8与类型记录和Node的版本有不同的变化。
打字本版本应为3.4
节点版本应为12或更高版本
https://stackoverflow.com/questions/56440350
复制相似问题