Comments (17)
Thanks for the report. This is now fixed in v6.0.0-beta.4
from fullcalendar-angular.
Please prio! :)
from fullcalendar-angular.
Same here, just upgraded to Angular 14, with 6.0.0-beta3
.
Offending import: https://github.com/fullcalendar/fullcalendar-angular/blob/v6.0.0-beta.3/lib/src/full-calendar.module.ts#L14
Is there a specific reason why BrowserModule
is imported?
from fullcalendar-angular.
No, downgrade does not solve the problem. :-( Still got the same error message
from fullcalendar-angular.
This is because FullCalendarModule
is importing BrowserModule
https://github.com/fullcalendar/fullcalendar-angular/blob/v6/lib/src/full-calendar.module.ts
As I understand it, BrowserModule
should never be imported inside a library and should only be imported in the root module of an application
I suspect what should be imported inside FullCalendarModule
is CommonModule
from fullcalendar-angular.
Small workaround:
- Go to app.module.ts
- Replace BrowserModule with FullCalendarModule in imports
- Add your component(s) which are using FullCalendar in declarations there
No lazy loading possible yet.
from fullcalendar-angular.
Works great now on v15, thanks for the quick fix and all your efforts.
from fullcalendar-angular.
I don't think there's a quick workaround for using 6.0.0-beta3
with Angular 14+ in a lazy-loaded Angular module - except from repackaging the lib in your own fork, but this isn't what I would call 'quick', especially since the setup to build the package looks quite extensive.
However, there exists a workaround for using version 5.x in Angular 14:
https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/angular14#workarounds
It involves customizing Webpack to prevent the Angular build from trying to process Full Calendar's CSS. We've put this in place in our project and the workaround works fine.
from fullcalendar-angular.
I want to update my project to Angular 15 but I cannot get fullcalendar 6.0.0-beta3 running.
If I run it in the app.module like in the sample project everything is fine. But I use it in a submodule (AppModule => MyServiceModule => MyCalendarModule). I always get the error:
Error: Providers from the
BrowserModule
have already been loaded.Please provide a fast solution. I have to do an update as soon as possible. Thank you very much!
You can downgrade to 6.0.0.beta2 with Angular 15 waiting there update fullcalendar
from fullcalendar-angular.
This issue is preventing us from testing the v6 beta for event projection, as we use the module in two lazy loaded feature modules. I presume that the solution proposed by @Lightw3ight should work, a library should not import the BrowserModule.
I can test the content projection in a simpler project, but I can't really justify keeping the workaround and preventing two large modules to be loaded upfront
from fullcalendar-angular.
Same here, anyone has a workaround?
from fullcalendar-angular.
Got same. Currently using 6.0.0.beta2 and waiting solution to update to 6.0.0.beta3
from fullcalendar-angular.
I want to update my project to Angular 15 but I cannot get fullcalendar 6.0.0-beta3 running.
If I run it in the app.module like in the sample project everything is fine.
But I use it in a submodule (AppModule => MyServiceModule => MyCalendarModule).
I always get the error:
Error: Providers from the BrowserModule
have already been loaded.
Please provide a fast solution. I have to do an update as soon as possible.
Thank you very much!
from fullcalendar-angular.
No, downgrade does not solve the problem. :-( Still got the same error message
Oh sorry for this... you can checkout my packages version.. my project is working find.
"@angular/animations": "~15.0.0",
"@angular/common": "~15.0.0",
"@angular/compiler": "~15.0.0",
"@angular/core": "~15.0.0",
"@angular/forms": "~15.0.0",
"@angular/platform-browser": "~15.0.0",
"@angular/platform-browser-dynamic": "~15.0.0",
"@angular/router": "~15.0.0",
"@fullcalendar/angular": "6.0.0-beta.2",
"@fullcalendar/core": "6.0.0-beta.2",
"@fullcalendar/google-calendar": "6.0.0-beta.2",
"@fullcalendar/interaction": "6.0.0-beta.2",
"@fullcalendar/list": "6.0.0-beta.2",
"@fullcalendar/timegrid": "6.0.0-beta.2",
Try delete package-lock.json
and node_modules
then run npm install
from fullcalendar-angular.
No, still not better. Instead of the other modules in version 15.0.0 I use 15.0.2.
But the point is, as far as I guess, that the fullcalender imports the BrowserModul.
Also in Version 6.0.0-beta2.
What I try to do now is to remove fullcalendarmodule from MyCalendarModule and put it in the app.module.
And also my components go from MyCalendarModule to the app.module (in the declarations and exports). Seems to work, but of course I lose the lazy loading :-(
from fullcalendar-angular.
@arshaw can you confirm that this BrowserModule
issue we're seeing is related to an improper import within FullCalendar?
Error: Providers from the `BrowserModule` have already been loaded. If you need access to common directives such as NgIf and NgFor, import the `CommonModule` instead.
I can confirm this only occurs in feature modules where FullCalendarModule
is imported.
from fullcalendar-angular.
This works for me as well even if its a bit dirty. Thanks for that.
from fullcalendar-angular.
Related Issues (20)
- How @fullcalendar/adaptive work? HOT 1
- @fullcalendar/angular Not working in angular universal HOT 1
- Re-initializing the calendar with events and resources can cause resources to be initially scrolled HOT 2
- node_modules/@fullcalendar/common/main.css:4:0 - Error: Module parse failed: Unexpected token (4:0) HOT 4
- Full Calendar with month view on the side HOT 1
- Angular 14 support V6 of FullCalendar. HOT 2
- v6 example project error "The selector "app-root" did not match any elements" HOT 2
- Tooltip Issue in Angular HOT 1
- TypeError in Angular 14 with v6 beta 2 HOT 1
- Dependency installation error for Angular 15.0.1 HOT 2
- Remove fast-deep-equal library for the lack of ESM support HOT 3
- View arg in `datesSet` is missing `type` property HOT 5
- Inputs should accept undefined/null for compatibility with async HOT 1
- schedulerLicenseKey is not assignable to type CalendarOptions HOT 2
- Certain ng-template names don't work HOT 4
- Missing property in ViewApi interface HOT 1
- This issue tracker has moved
- My calendar is not rendering fully in chrome. It works fine in Firefox HOT 1
- Getting this error while trying to run the cloned code HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fullcalendar-angular.