not working with ivy
p3x-robot opened this issue ยท 17 comments
Description
It is not working with Ivy.
Expected Behavior
It should work with Ivy.
Actual Behavior
Throws this errors:
ERROR in ../node_modules/videogular2/compiled/src/core/core.d.ts:29:22 - error TS-996002: Appears in the NgModule.imports of EmotionsModule, but could not be resolved to an NgModule class
29 export declare class VgCoreModule {
~~~~~~~~~~~~
../node_modules/videogular2/compiled/src/controls/controls.d.ts:1:22 - error TS-996002: Appears in the NgModule.imports of EmotionsModule, but could not be resolved to an NgModule class
1 export declare class VgControlsModule {
~~~~~~~~~~~~~~~~
../node_modules/videogular2/compiled/src/overlay-play/overlay-play.d.ts:1:22 - error TS-996002: Appears in the NgModule.imports of EmotionsModule, but could not be resolved to an NgModule class
1 export declare class VgOverlayPlayModule {
~~~~~~~~~~~~~~~~~~~
../node_modules/videogular2/compiled/src/streaming/streaming.d.ts:6:22 - error TS-996002: Appears in the NgModule.imports of EmotionsModule, but could not be resolved to an NgModule class
6 export declare class VgStreamingModule {
~~~~~~~~~~~~~~~~~
app/emotions/emotions.module.ts:264:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
264 export class EmotionsModule { }
~~~~~~~~~~~~~~
Steps to Reproduce
Try to build a videoangular2 with Ivy enabled.
Attachments
I think it looks like the videogular2 modules are not decorated with @NgModule or should be built with es2015?
@p3x-robot that issue has now been closed by the Angular team and this error is still appearing in the latest Angular 9 RC 10.
i thinks it is better to compile to es2015 instead of es5, maybe it could work, besides closure compiler likes the annotateForClosureCompiler as says https://github.com/patrikx3/angular-compile/blob/master/tsconfig.build.json#L37
@p3x-robot will you being doing an update release in es2015 mode?
i tried, but as the readme shows how to build it it throws and error..... i would love to try with an es2015 build, i think it should work
i face this error:
patrikx3@bitang:~/Projects/videogular2$ npm install
-------------- the installl -----------
patrikx3@bitang:~/Projects/videogular2$ npm start
> videogular2@0.0.0-semantically-released start /home/patrikx3/Projects/videogular2
> run-p "watch:ts" "start:coverage-server"
> videogular2@0.0.0-semantically-released watch:ts /home/patrikx3/Projects/videogular2
> watch "npm run build" src
> videogular2@0.0.0-semantically-released start:coverage-server /home/patrikx3/Projects/videogular2
> http-server -c-1 -o -p 9875 ./coverage
> Watching src
Starting up http-server, serving ./coverage
Available on:
http://127.0.0.1:9875
http://192.168.57.122:9875
Hit CTRL-C to stop the server
> videogular2@0.0.0-semantically-released prebuild /home/patrikx3/Projects/videogular2
> npm run clean
[2020-01-27T10:29:55.781Z] "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
(node:30856) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[2020-01-27T10:29:55.786Z] "GET /" Error (404): "Not found"
> videogular2@0.0.0-semantically-released clean /home/patrikx3/Projects/videogular2
> rimraf -rf ./src/**/*.js && rimraf -rf ./src/**/*.d.ts && rimraf -rf ./compiled
> videogular2@0.0.0-semantically-released build /home/patrikx3/Projects/videogular2
> ngc
src/core/services/vg-api.spec.ts(251,49): error TS2345: Argument of type '{ id: string; }' is not assignable to parameter of type 'IPlayable | AsymmetricMatcher<any>'.
Type '{ id: string; }' is missing the following properties from type 'IPlayable': elem, time, buffer, canPlay, and 12 more.
src/core/services/vg-api.spec.ts(252,49): error TS2345: Argument of type '{ id: string; }' is not assignable to parameter of type 'IPlayable | AsymmetricMatcher<any>'.
Type '{ id: string; }' is missing the following properties from type 'IPlayable': elem, time, buffer, canPlay, and 12 more.
src/core/services/vg-api.spec.ts(265,49): error TS2345: Argument of type '{ id: string; }' is not assignable to parameter of type 'IPlayable | AsymmetricMatcher<any>'.
Type '{ id: string; }' is missing the following properties from type 'IPlayable': elem, time, buffer, canPlay, and 12 more.
src/core/services/vg-api.spec.ts(266,49): error TS2345: Argument of type '{ id: string; }' is not assignable to parameter of type 'IPlayable | AsymmetricMatcher<any>'.
Type '{ id: string; }' is missing the following properties from type 'IPlayable': elem, time, buffer, canPlay, and 12 more.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! videogular2@0.0.0-semantically-released build: `ngc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the videogular2@0.0.0-semantically-released build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/patrikx3/.npm/_logs/2020-01-27T10_30_00_124Z-debug.log
Getting the same error with Angular 9
Same error
https://www.npmjs.com/package/@hitrecord/videogular2 I have videogular2 forked and fixed here (you can see the diffs if you look my unmerged commits in the history). I am unable to make a PR of it into the main project for the next few weeks most likely but others are welcome to use it. It is used on hitrecord.org on all pages you see with embedded video and audio currently to show working examples.
any updates on this issue?
We're rolling out an Ivy compatible and future-proofed package in the following days.
Stay tuned and thanks for your interest! ๐
I'm running v7.0.2 of this library, and v9.1.9 of angular and getting something similar on production build:
ERROR in node_modules/videogular2/compiled/src/core/core.d.ts:29:22 - error NG6002: Appears in the NgModule.imports of SharedModule, 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.
Just asking if the issue should be resolved with the 7.0.2 release, or is another release coming? Thanks!
7.0.2 doesn't fix this issue, someone should take the @jdodsoncollins work and make a pull request
On v9 and higher please use https://www.npmjs.com/package/@videogular/ngx-videogular
Seems like docs are a work in progress... I had to do this to repair the module imports in my project:
import { CoreModule as VgCoreModule } from '@videogular/ngx-videogular/core';
import { ControlsModule as VgControlsModule } from '@videogular/ngx-videogular/controls';
import { OverlayPlayModule as VgOverlayPlayModule } from '@videogular/ngx-videogular/overlay-play';
import { BufferingModule as VgBufferingModule } from '@videogular/ngx-videogular/buffering';
... and update angular.json according to https://github.com/videogular/ngx-videogular/tree/master/docs/ngx-videogular-demo/getting-started