videogular / videogular2

The HTML5 video player for Angular 2
https://videogular.github.io/videogular2-showroom/#/
MIT License
672 stars 211 forks source link

Videogular2 modules not found #844

Open YomeKatsuma opened 5 years ago

YomeKatsuma commented 5 years ago

Description

The application is unable to compile. The basic app.module.ts contening import of all the videogular2 does not work.

Angular version => 8.1.2

Expected Behavior

Normal way to import Module in Angular should working as explained in the 'Getting Started':

https://videogular.github.io/videogular2/docs/getting-started/

Actual Behavior

Transpiler is unable to find the Videagular2's modules.

ERROR in src/app/app.module.ts:4:30 - error TS2307: Cannot find module 'videogular2/core'.

4 import { VgCoreModule } from 'videogular2/core';
                               ~~~~~~~~~~~~~~~~~~
src/app/app.module.ts:5:34 - error TS2307: Cannot find module 'videogular2/controls'.

5 import { VgControlsModule } from 'videogular2/controls';
                                   ~~~~~~~~~~~~~~~~~~~~~~
src/app/app.module.ts:6:37 - error TS2307: Cannot find module 'videogular2/overlay-play'.

6 import { VgOverlayPlayModule } from 'videogular2/overlay-play';
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/app.module.ts:7:35 - error TS2307: Cannot find module 'videogular2/buffering'.

7 import { VgBufferingModule } from 'videogular2/buffering';
                                    ~~~~~~~~~~~~~~~~~~~~~~~

Steps to Reproduce

Just add import in the app.module.ts file (after all npm install done!)

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { VgCoreModule } from 'videogular2/core';
import { VgControlsModule } from 'videogular2/controls';
import { VgOverlayPlayModule } from 'videogular2/overlay-play';
import { VgBufferingModule } from 'videogular2/buffering';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    VgCoreModule,
    VgControlsModule,
    VgOverlayPlayModule,
    VgBufferingModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
YomeKatsuma commented 5 years ago

All works if i add 'compiled/' in the import path :

import { VgCoreModule } from 'videogular2/compiled/core';
import { VgControlsModule } from 'videogular2/compiled/controls';
import { VgOverlayPlayModule } from 'videogular2/compiled/overlay-play';
import { VgBufferingModule } from 'videogular2/compiled/buffering';
amrishkakadiya commented 4 years ago

still not working after using compiled folder modules.

throwing following error

   ERROR in node_modules/videogular2/compiled/src/core/core.d.ts:29:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

    This likely means that the library (videogular2/compiled/core) which declares VgCoreModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy.
Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

    29 export declare class VgCoreModule {
                            ~~~~~~~~~~~~
    node_modules/videogular2/compiled/src/controls/controls.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

    This likely means that the library (videogular2/compiled/controls) which declares VgControlsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

    1 export declare class VgControlsModule {
                           ~~~~~~~~~~~~~~~~
    node_modules/videogular2/compiled/src/overlay-play/overlay-play.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

    This likely means that the library (videogular2/compiled/overlay-play) which declares VgOverlayPlayModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

    1 export declare class VgOverlayPlayModule {
                           ~~~~~~~~~~~~~~~~~~~
    node_modules/videogular2/compiled/src/buffering/buffering.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

    This likely means that the library (videogular2/compiled/buffering) which declares VgBufferingModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

    1 export declare class VgBufferingModule {
cuznerdexter commented 4 years ago

Yes I am also seeing this error. Trying to use the basic example template. Nothing works. `

` getting the same errors as above. `ERROR in node_modules/videogular2/compiled/src/core/core.d.ts:29:22 - error NG6002: Appears in the NgModule.imports of VideotestModule, but could not be resolved to an NgModule class. ` Is there a solution to this ?
haifzhan commented 4 years ago

I had the same error, can anyone help?

amrishkakadiya commented 4 years ago

I had the same error, can anyone help?

I switch to basic html5 player. You can try other library.

stephencawood commented 4 years ago

There's a new version for Angular 9. Docs clearly aren't done yet, but you can look here: https://github.com/videogular/ngx-videogular/tree/master/docs/ngx-videogular-demo/getting-started