Recent upgrade to angular v10 spots cyclic dependencies in Date Adapter #1284
See original GitHub issueDescribe the bug
As per title I found this error after upgrading to Angular v10.
Uncaught (in promise): Error: Cannot instantiate cyclic dependency! DateAdapter Error: Cannot instantiate cyclic dependency! DateAdapter at throwCyclicDependencyError (http://localhost:4200/vendor.js:70412:11) at R3Injector.hydrate (http://localhost:4200/vendor.js:76317:13) at R3Injector.get (http://localhost:4200/vendor.js:76143:33) at NgModuleRef$1.get (http://localhost:4200/vendor.js:89037:33) at Object.get (http://localhost:4200/vendor.js:87293:35) at getOrCreateInjectable (http://localhost:4200/vendor.js:68854:39) at Module.ɵɵdirectiveInject (http://localhost:4200/vendor.js:78825:12) at NodeInjectorFactory.CalendarNextViewDirective_Factory [as factory] (http://localhost:4200/vendor.js:138405:189) at getNodeInjectable (http://localhost:4200/vendor.js:68962:44) at instantiateAllDirectives (http://localhost:4200/vendor.js:73077:27) Error: Uncaught (in promise): Error: Cannot instantiate cyclic dependency! DateAdapter Error: Cannot instantiate cyclic dependency! DateAdapter at throwCyclicDependencyError (http://localhost:4200/vendor.js:70412:11) at R3Injector.hydrate (http://localhost:4200/vendor.js:76317:13) at R3Injector.get (http://localhost:4200/vendor.js:76143:33) at NgModuleRef$1.get (http://localhost:4200/vendor.js:89037:33) at Object.get (http://localhost:4200/vendor.js:87293:35) at getOrCreateInjectable (http://localhost:4200/vendor.js:68854:39) at Module.ɵɵdirectiveInject (http://localhost:4200/vendor.js:78825:12) at NodeInjectorFactory.CalendarNextViewDirective_Factory [as factory] (http://localhost:4200/vendor.js:138405:189) at getNodeInjectable (http://localhost:4200/vendor.js:68962:44) at instantiateAllDirectives (http://localhost:4200/vendor.js:73077:27) at resolvePromise (http://localhost:4200/polyfills.js:3904:39) at resolvePromise (http://localhost:4200/polyfills.js:3856:21) at http://localhost:4200/polyfills.js:3966:21 at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3505:35) at Object.onInvokeTask (http://localhost:4200/vendor.js:92230:33) at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3504:40) at Zone.runTask (http://localhost:4200/polyfills.js:3273:51) at drainMicroTaskQueue (http://localhost:4200/polyfills.js:3675:39) at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:3590:25) at invokeTask(http://localhost:4200/polyfills.js:4727:18)
Minimal reproduction of the problem with instructions
not need
Screenshots
not need Versions
@angular/core
: 10.0.0angular-calendar
: 0.28.16- Browser name and version: any
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
NG0200: Circular dependency in DI detected while ... - Angular
A cyclic dependency exists when a dependency of a service directly or indirectly depends on the service itself. For example, if UserService depends...
Read more >WARNING in Circular dependency detected - Angular Cli
Removing the import doesn't help in this case. The circular dependency is caused by the calls to new Forms() and new CustomForms(). –...
Read more >Changelog - Highcharts
View changelog for Highcharts, Highcharts Stock, Highcharts Maps, Highcharts Gantt. Go to the Download page to get the latest version. Highcharts. Highcharts ...
Read more >Dependencies analysis | IntelliJ IDEA Documentation - JetBrains
Dependencies analysis. Last modified: 20 December 2022. If you have a large Java project with several modules that uses multiple libraries, any operation ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As per this comment, the deduping seems to be caused by the date-fns module in
/date-adapters
not having name or version. Simply adding some dummy name to the package.json file fixes this, eg:Thank you @mattlewis92 I’ve subscribed to the issue you mentioned and let you know the status of this once tested