模块'" node_modules / @ angular / animations / animations"'没有导出的成员' AnimationBuilder'

时间:2017-10-14 18:37:50

标签: ios angular ionic-framework build transpiler

我只是按照these指示努力让我的应用加载我的应用(它挂在启动画面上)。

总之我这样做了:

npm install -g ionic@latest
npm install ionic-angular@3.7.0 --save
npm install @ionic/app-scripts@3.0.0 --save-dev
npm install @angular/core@4.4.3 --save
npm install @angular/common@4.4.3 --save
npm install @angular/compiler@4.4.3 --save
npm install @angular/compiler-cli@4.4.3 --save
npm install @angular/forms@4.4.3 --save
npm install @angular/http@4.4.3 --save
npm install @angular/platform-browser@4.4.3 --save
npm install @angular/platform-browser-dynamic@4.4.3 --save
npm install rxjs@5.4.3 --save
npm install zone.js@0.8.17 --save

现在,当我运行ionic package build ios时,我收到了以下错误:

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/animation_builder.d.ts, line: 8 
            Module '"/Users/eamonwhite/ionicmane/myApp/node_modules/@angular/animations/animations"' has no exported 
            member 'AnimationBuilder'. 

       L7:      constructor(rootRenderer: RendererFactory2, doc: any);
       L8:      build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/animation_builder.d.ts, line: 8 
            Module '"/Users/eamonwhite/ionicmane/myApp/node_modules/@angular/animations/animations"' has no exported 
            member 'AnimationFactory'. 

       L7:      constructor(rootRenderer: RendererFactory2, doc: any);
       L8:      build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/animation_builder.d.ts, line: 8 
            Module '"/Users/eamonwhite/ionicmane/myApp/node_modules/@angular/animations/animations"' has no exported 
            member 'AnimationOptions'. 

       L7:      constructor(rootRenderer: RendererFactory2, doc: any);
       L8:      build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 'flush' from 
            class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 'listen' from 
            class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 'onInsert' from 
            class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 'onRemove' from 
            class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 
            'registerTrigger' from class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

[14:21:32]  typescript: node_modules/@angular/platform-browser/animations/src/providers.d.ts, line: 5 
            Non-abstract class 'InjectableAnimationEngine' does not implement inherited abstract member 'setProperty' 
            from class 'AnimationEngine'. 

       L4:  import { AnimationRendererFactory } from './animation_renderer';
       L5:  export declare class InjectableAnimationEngine extends AnimationEngine {
       L6:      constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer);

Error: Failed to transpile program
    at new BuildError (/Users/eamonwhite/ionicmane/myApp/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /Users/eamonwhite/ionicmane/myApp/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
    at transpileWorker (/Users/eamonwhite/ionicmane/myApp/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
    at Object.transpile (/Users/eamonwhite/ionicmane/myApp/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
    at /Users/eamonwhite/ionicmane/myApp/node_modules/@ionic/app-scripts/dist/build.js:106:82

我检查了文件夹,我认为它找不到所有的东西(在d.ts文件中)。

任何帮助都会很棒。我这样做是为了让我的应用程序运行,在iOS 11发布后,它开始在splashscreen上加载。

1 个答案:

答案 0 :(得分:8)

我需要更新动画模块:

npm install @angular/animations@latest --save