BrowserAnimationsModule在添加到app.module时会生成错误

时间:2017-09-11 17:21:30

标签: angular webpack angular2-animation

我正在使用dotnet SPA模板创建一个新的角度应用。但是当我在app.module.shared.ts上添加BrowserAnimationsModule时出现错误:

> tslib.es6.js:22 Uncaught TypeError: Object prototype may only be an Object or null: undefined
    at setPrototypeOf (<anonymous>)
    at Object.__extends [as a] (tslib.es6.js:22)
    at animations.es5.js:19
    at Object.<anonymous> (animations.es5.js:48)
    at __webpack_require__ (bootstrap 92a14228f6f033f85575:676)
    at fn (bootstrap 92a14228f6f033f85575:86)
    at Object.<anonymous> (app.module.shared.ts:1)
    at __webpack_require__ (bootstrap 92a14228f6f033f85575:676)
    at fn (bootstrap 92a14228f6f033f85575:86)
    at Object.<anonymous> (app.module.client.ts:5)

> [HMR] bundle has 6 warnings client.js:176
> ./node_modules/@angular/animations/@angular/animations/browser.es5.js
> 2255:29-39 "export 'ɵPRE_STYLE' was not found in '@angular/animations'
> ./node_modules/@angular/animations/@angular/animations/browser.es5.js
> 3990:97-107 "export 'ɵPRE_STYLE' was not found in
> '@angular/animations'
> ./node_modules/@angular/animations/@angular/animations/browser.es5.js
> 42:25-35 "export 'ɵPRE_STYLE' was not found in '@angular/animations'
> ./node_modules/@angular/platform-browser/@angular/platform-browser/animations.es5.js
> 48:2-18 "export 'AnimationBuilder' was not found in
> '@angular/animations'
> ./node_modules/@angular/platform-browser/@angular/platform-browser/animations.es5.js
> 643:15-31 "export 'AnimationBuilder' was not found in
> '@angular/animations'
> ./node_modules/@angular/platform-browser/@angular/platform-browser/animations.es5.js
> 80:2-18 "export 'AnimationFactory' was not found in
> '@angular/animations'

这是我的包json:

 "dependencies": {
    "@angular/animations": "^4.3.6",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.3.6",
    "@angular/compiler": "^4.3.6",
    "@angular/core": "^4.3.6",
    "@angular/forms": "^4.3.6",
    "@angular/http": "^4.3.6",
    "@angular/material": "^2.0.0-beta.10",
    "@angular/platform-browser": "^4.3.6",
    "@angular/platform-browser-dynamic": "^4.3.6",
    "@angular/platform-server": "^4.3.6",
    "@angular/router": "^4.3.6",
    "@types/hammerjs": "^2.0.35",
    "@types/node": "^8.0.28",
    "angular2-template-loader": "0.6.2",
    "aspnet-prerendering": "^3.0.1",
    "aspnet-webpack": "^2.0.1",
    "awesome-typescript-loader": "^3.2.3",
    "bootstrap": "3.3.7",
    "css": "2.2.1",
    "css-loader": "^0.28.7",
    "es6-shim": "0.35.3",
    "event-source-polyfill": "0.0.9",
    "expose-loader": "0.7.3",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^0.11.2",
    "hammerjs": "^2.0.8",
    "html-loader": "^0.5.1",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "json-loader": "^0.5.7",
    "npm": "^5.3.0",
    "preboot": "^5.0.0",
    "raw-loader": "0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "^5.4.3",
    "save": "^2.3.1",
    "style-loader": "^0.18.2",
    "to-string-loader": "1.1.5",
    "typescript": "^2.5.2",
    "url-loader": "^0.5.9",
    "webpack": "^3.5.6",
    "webpack-dev-server": "^2.7.1",
    "webpack-hot-middleware": "^2.19.1",
    "webpack-merge": "4.1.0",
    "zone.js": "^0.8.17"

我基本上有模板,将最新的@angular更新为4.3.6添加的cdk,素材和动画。 我似乎无法找到我的问题的参考。该模板使用webpack。

0 个答案:

没有答案