question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug

Hello together,

i update Angular 9 to Angular 10.

Now i get this error message. Somebody know what to do?

Greetings Björn

ERROR Error: Cannot instantiate cyclic dependency! DateAdapter at throwCyclicDependencyError (core.js:5357) at R3Injector.hydrate (core.js:11262) at R3Injector.get (core.js:11088) at NgModuleRef$1.get (core.js:23982) at Object.get (core.js:22238) at getOrCreateInjectable (core.js:3799) at Module.ɵɵdirectiveInject (core.js:13770) at NodeInjectorFactory.CalendarPreviousViewDirective_Factory [as factory] (angular-calendar.js:917) at getNodeInjectable (core.js:3907) at instantiateAllDirectives (core.js:8022)

Minimal reproduction of the problem with instructions

Screenshots

Versions

  • @angular/core: 10.0
  • angular-calendar: latest
  • Browser name and version: chrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ljunokascommented, Jun 25, 2020

I managed to do quick (ugly) fix until update comes: at the end of the module:

import * as tslib_1 from 'tslib'
import * as date_fns_2 from 'date-fns'

function adapterFactory() {
  return tslib_1.__assign(tslib_1.__assign({}),date_fns_2);
}

and in imports:

imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    MatSelectModule,
    MatTooltipModule,
    CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory }),
  ...
  ],

At least it works for me, its something wrong with adapterFactory. not all functions are being created

1reaction
jasonkonopackicommented, Jul 6, 2020

@mattlewis92 Thanks for the clarification - @angular/cli@10.0.1 fixed the issue. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version 10 of Angular Now Available | by Stephen Fluin
Version 10.0.0 is here! This is a major release that spans the entire platform, including the framework, Angular Material, and the CLI.
Read more >
10.0.0 - @angular/cli - npm
CLI tool for Angular. Latest version: 15.0.4, last published: 9 days ago. Start using @angular/cli in your project by running `npm i ...
Read more >
What's new in Angular 10? - Clarion Technologies
Angular 10 was generally available as a product release on June 24. The major development of the Google-based framework, which is based on...
Read more >
Everything you should know about Angular 10 - Javatpoint
The version 10.0.0 of Angular framework is released now. It is known as Angular 10 and released on June 24, 2020. Angular 10...
Read more >
Side By Side Comparison Between Angular 10 vs Angular 11
Angular 11 also has dropped the support for IE 9, 10, and IE mobile. The difference between Angular 10 and Angular 11 with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found