-
Notifications
You must be signed in to change notification settings - Fork 47
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
No provider for Router! Angular 12 Matomo 1.0.0-rc.1 #58
Comments
I did not test it yet. I was pretty sure it would work the same. |
I made some tests with my demo application and so far, it's working correctly. Can you explain me how you load the router and ngx-matomo modules in your app? |
I also get the same error when the Seems like someone else also facing this error #65 |
Hello, is there any progress here? |
Same error after upgrading to angular 15. We use yarn, will try npm (see #65 (comment) ) |
Same error if you install the library using yarn. |
I'll try to reproduce this error. It's not quite common, but too many people suffer from it! |
Hello, Here are my dependencies : Also, we are working on Windows. I did the test again and I can confirm. add ngx-matomo: 1.1.0 to package.json rm -rf nodes_module/ngx-matomo |
Hello, I encounter the same issue using yarn as package manager. Looks to work with npm, but I use yarn everywhere. |
I shall now be able to reproduce. This might be an issue the optionalDepency as indicated in the package.json file of ngx-matomo. |
I also use yarn for all of my private projects, however, each and every Angular App I have is using the Angular Router, so I guess, I am in the sweet spot for not having any problem. |
@bastienjalbert or @RomainFALLER, I guess I found my mistake. I can build an updated version of the 2.0 or 1.1 version with this fix and send it directly to you for testing since I don't want to publish a test package on the NPM registry. All you would need to do is tell me which version you want patched (1.1 or 2.0), receive the TAR file, decompress it to your drive, modify your package.json file to update the ngx-matomo dependency and test. Who's in? |
Let's do it. I will test it and let you know the result. Thank you. |
Hi @Arnaud73, may you push the branch with your modifications ? That way I'll build the package in local and try your fix. |
@bastienjalbert, the branch is |
@Arnaud73 I followed the steps below :
I still have the error No provider for ActivatedRouter... The package.json of the ngx-matomo I am using is the one bellow: If I delete ngx-matomo and install with If I modify my package.json with this, it works with yarn : Thank you. Romain |
Too bad it does not work (however I think I will keep this modification). |
Thanks @RomainFALLER! I think I know my mistake. With the previous declaration of optional dependencies, Basically, I thought I was able to make the module work without Stay tuned, I'll post an update to my findings. |
Thank you, very interesting. I am waiting for your modifications :). However, you don't mention any connection with a possible version of the package @angular/router, so how can we explain the different behaviours regarding the version (15.2.1 vs 15.2.9 for example) ? |
I have the same error as @RomainFALLER on the latest version of the package and angular 16.1. angular/router is installed and should work as expected... I have no idea what I did wrong. I ended up removing the package... And I have no workaround sorry. |
Hi,
I have issue with routeTracking functionality in Angular 12, when I enable it to true like in README file all I get is missing Router provider error.
My deps are:
"dependencies": { "@angular-devkit/schematics": "12.0.2", "@angular/animations": "^12.0.0", "@angular/cdk": "^12.0.2", "@angular/common": "^12.0.0", "@angular/compiler": "^12.0.0", "@angular/core": "^12.0.0", "@angular/forms": "^12.0.0", "@angular/material": "^12.0.2", "@angular/platform-browser": "^12.0.0", "@angular/platform-browser-dynamic": "^12.0.0", "@angular/router": "^12.0.0", "@angular/upgrade": "^12.0.0", ... "ngx-matomo": "^1.0.0-rc.1", ... }
When routeTracking is set to false everything looks fine. I've also tried to set it to false and run MatomoRouteTracker startTracking method manually at later point but it's the same issue.
It occurs for lazy loading routes.
The text was updated successfully, but these errors were encountered: