ionic-audio icon indicating copy to clipboard operation
ionic-audio copied to clipboard

Type 'typeof AudioProvider[]' is not assignable to type 'Provider[]'.

Open jdell64 opened this issue 10 years ago • 9 comments

How do you include the AudioProvider in a new ionic 2 app (or just Angular2 in the @NgModule)?

I tried putting it it providers:[] but I get this error:

[14:50:40]  Error: src/app/app.module.ts(16,11): error TS2345: Argument of type '{ declarations: (typeof HomePage | typeof AnnouncementPage | typeof TabsPage | typeof MyApp)[]; i...' is not assignable to parameter of type 'NgModule'.
  Types of property 'providers' are incompatible.
    Type 'typeof AudioProvider[]' is not assignable to type 'Provider[]'.
      Type 'typeof AudioProvider' is not assignable to type 'Provider'.
        Type 'typeof AudioProvider' is not assignable to type 'FactoryProvider'.
          Property 'provide' is missing in type 'typeof AudioProvider'.

    at Socket.<anonymous> (/Users/jeff/dev/ang_projects/ChildCare/node_modules/@ionic/app-scripts/dist/tsc.js:72:33)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at Pipe.onread (net.js:542:20)

jdell64 avatar Oct 04 '16 18:10 jdell64

I haven't yet tested the plugin on the latest RC0. Will do that as soon as I find some spare time.

arielfaur avatar Oct 05 '16 03:10 arielfaur

Thanks! It seems simple enough, but I don't know the code well enough to make a pull request.

On Tuesday, October 4, 2016, arielfaur [email protected] wrote:

I haven't yet tested the plugin on the latest RC0. Will do that as soon as I find some spare time.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arielfaur/ionic-audio/issues/77#issuecomment-251575909, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0oYBvMfHVbsAbqZOsUcsYK2moJaKiuks5qwx_OgaJpZM4KOBrC .

Richard J Tindell

Ps 102:18- "This will be written for the generation to come, That a people yet to be created may praise the Lord."

jdell64 avatar Oct 05 '16 12:10 jdell64

I have the same problem!

behnamazimi avatar Oct 08 '16 05:10 behnamazimi

+1

biemond avatar Oct 30 '16 16:10 biemond

+1

chahalsukhveer avatar Oct 30 '16 19:10 chahalsukhveer

+1

pascalgermain avatar Oct 31 '16 02:10 pascalgermain

+1

Doesn't work on Ionic 2.1.4. Ionic changed all the structure, since providers:[], ionicBootstrap (doesn't exists anymore), we cannot put "directives: []" into @Component decorator, many many more.

Can u update? Thanks mate!

saade avatar Nov 01 '16 04:11 saade

+1

AbuHani avatar Nov 03 '16 08:11 AbuHani

Solved with #78

arielfaur avatar Nov 09 '16 23:11 arielfaur