videogular2 icon indicating copy to clipboard operation
videogular2 copied to clipboard

Videogular2 modules not found

Open YomeKatsuma opened this issue 6 years ago • 6 comments

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 avatar Jul 22 '19 12:07 YomeKatsuma

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';

YomeKatsuma avatar Jul 22 '19 12:07 YomeKatsuma

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 {
             

amrishkakadiya avatar Jun 27 '20 06:06 amrishkakadiya

Yes I am also seeing this error. Trying to use the basic example template. Nothing works. <vg-player> <video [vgMedia]="media" #media id="singleVideo" preload="auto" controls> <source src="http://static.videogular.com/assets/videos/videogular.mp4" type="video/mp4"> </video> </vg-player>

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 ?

cuznerdexter avatar Jun 29 '20 07:06 cuznerdexter

I had the same error, can anyone help?

haifzhan avatar Jul 08 '20 23:07 haifzhan

I had the same error, can anyone help?

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

amrishkakadiya avatar Jul 09 '20 04:07 amrishkakadiya

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

stephencawood avatar Aug 18 '20 05:08 stephencawood