SamirHodzic / ngx-embed-video

Get embed code for embedding youtube/vimeo/dailymotion/* video in websites from URL or ID in Angular 6+.
MIT License
56 stars 41 forks source link

Can't find module @angular/Http #6

Closed mcblum closed 6 years ago

mcblum commented 6 years ago

Hello! It looks like the package is using an older version of the HTTP client. Here's the exact message:

ERROR in node_modules/ngx-embed-video/dist/src/embed-video.service.d.ts(1,22): error TS2307: Cannot find module '@angular/http'.

I think that needs to be updated to HttpClient, but I'm not totally sure. I'm going to try to hack at it for now but if you have a chance to take a look I'd really appreciated it!

Matt

mcblum commented 6 years ago

Ok, did some quick tests, that is, in fact, the issue. For anyone else that comes across this @angular/http was depreciated and is no longer included with Angular > 5 new applications. The new package is part of HttpClientModule. However, you can always yarn add @angular/http to make this work.

Edit: You will also need to make sure to explicitly import HttpModule in your application.

SamirHodzic commented 6 years ago

Hi, I'm already aware of this, main reason why I still didn't migrated package fully to Angular ^5. Will check it out soon when I catch time.

mmoravcik commented 6 years ago

@SamirHodzic is there any timeline? thank you

SamirHodzic commented 6 years ago

Currently, don't have time to play with it. If you have time to update it and test if it works fine with latest Angular, feel free to make a pull request.

lolaswift commented 6 years ago

same issue

mmoravcik commented 6 years ago

Pull request https://github.com/SamirHodzic/ngx-embed-video/pull/11 is ready, but not accepted...

SamirHodzic commented 6 years ago

Should be fine with #16, let me know if problem still exists.