amazing-time-picker icon indicating copy to clipboard operation
amazing-time-picker copied to clipboard

Does not work with Angular 7.2

Open m0j0nz0r opened this issue 4 years ago • 2 comments

specs: Win 10 Pro 64bit version 1903 build 18362.295 Chrome 76.0.3809.132 (official build) (64 bits)

To recreate:

  1. create a new angular project with angular cli.
  2. add amazing-date-picker to this new project.
  3. follow the instructions in the readme and use the component.

ng serve --aot fails with: ERROR in : Unexpected value 'AmazingTimePickerModule in {projectPath}/node_modules/amazing-time-picker/amazing-time-picker.d.ts' imported by the module 'AppModule in {projectPath}/src/app/app.module.ts'. Please add a @NgModule annotation.

ng serve will succeed with warnings:

WARNING in ./node_modules/amazing-time-picker/node_modules/@angular/core/fesm5/core.js 27315:15-36
Critical dependency: the request of a dependency is an expression

WARNING in ./node_modules/amazing-time-picker/node_modules/@angular/core/fesm5/core.js 27327:15-102
Critical dependency: the request of a dependency is an expression

going to localhost:4200 (default settings for ng serve) produces this error:

ERROR Error: StaticInjectorError(AppModule)[AtpDirective -> ViewContainerRef]: 
  StaticInjectorError(Platform: core)[AtpDirective -> ViewContainerRef]: 
    NullInjectorError: No provider for ViewContainerRef!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8896)
    at resolveToken (core.js:9141)
    at tryResolveToken (core.js:9085)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982)
    at resolveToken (core.js:9141)
    at tryResolveToken (core.js:9085)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982)
    at resolveNgModuleDep (core.js:21218)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21907)
    at resolveDep (core.js:22278)

m0j0nz0r avatar Sep 05 '19 19:09 m0j0nz0r

@m0j0nz0r did you ever find a way to overcome the issue?

mrjack88 avatar Feb 13 '20 00:02 mrjack88

@m0j0nz0r did you ever find a way to overcome the issue?

Only partially, Yarn seems to only download latest regardless of what version you tell it to install.

Using npm instead seems to get around the issue, but this is a sub optimal solution.

m0j0nz0r avatar Mar 19 '20 15:03 m0j0nz0r