videogular2: Missing ref of @types/es6-shim

Description

We use @types/core-js in our app and not @types/es6-shim. We can’t use both because they have overlapping definitions, and we are not prepared to switch away from core-js as it has stuff we need for other parts of our app. The type reference directives for es6-shim in various of videogular2’s declaration files are preventing us from being able to use videogular2 without errors using ngc for AoT compilation from our AoT entry file (i.e. the one that calls platformBrowser().bootstrapModuleFactory() instead of platformBrowserDynamic().bootstrapModule()).

Expected Behavior

Importing videogular2/controls etc., should succeed without errors.

Actual Behavior

Importing the libs gives the following errors with our setup:

Error at /Users/jskrzypek/dev/my-angular-project/node_modules/videogular2/src/controls/vg-playback-button/vg-playback-button.d.ts:1:1: Cannot find type definition file for 'es6-shim'.

This error is coming from various declaration files as generated in your build process, each of which includes this triple-slash reference directive:

/// <reference types="es6-shim" />

See Attachments below for a list of the files where I found these directives in the npm installation directory of videogular2@3.0.0.

When I manually remove these directives from the relevant .d.ts files, ngc is able to complete without errors.

Steps to Reproduce

I can spin up an example repo if needed, but this seems like a straightforward issue. Let me know if you want one anyway.

Attachments

Errors from running ngc
ngc_error
This is output from our build system. The first run of ngc with the JiT entry (i.e. platformBrowserDynamic().bootstrapModule(MyAppModule)) succeeds, but the second run with the AoT entry (i.e. platformBrowser().bootstrapModuleFactory(MyAppModuleNgFactory)) fails with the error on the third line. I haven’t investigated yet why the JiT build succeeds, but it doesn’t seem related because removing the directives fixes the issue without introducing further errors.
Locations of the es6-shim triple-slash directives
ag_output
I’ve tracked this issue down to these files/lines. The screenshot is of the out output ag --ts "es6-shim" node_modules/videogular2, i.e. using the silver searcher to query for "es6-shim" in TS files in the node_modules/videogular2 folder of our project.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Still getting the same errors. I’ll keep working at it, thanks for your help.