Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with Angular 7.2 #132

Open
m0j0nz0r opened this issue Sep 5, 2019 · 2 comments
Open

Does not work with Angular 7.2 #132

m0j0nz0r opened this issue Sep 5, 2019 · 2 comments

Comments

@m0j0nz0r
Copy link

m0j0nz0r commented Sep 5, 2019

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)
@mrjack88
Copy link

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

@m0j0nz0r
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants