Issue
I am making an IONIC project, and i get that error when I add Geolocation to my providers. If I take it out of the providers then my app works and even my proffessor can't solve it. This is my file: app.modules.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HttpClientModule } from '@angular/common/http';
import { Geolocation } from '@awesome-cordova-plugins/geolocation/ngx';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule],
providers: [Geolocation, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy
}],
bootstrap: [AppComponent],
})
export class AppModule {}
I have these 2 plugins in my dependencies:
"@awesome-cordova-plugins/core": "^6.4.0",
"@awesome-cordova-plugins/geolocation": "^6.4.0",
And it's driving me crazy,
I have tried to delete them, restar te project, delete and restart my node_modules folders but nothing works. I have another project using the same plugin, on my computer and it works, so the problem is with this project,
Any help is welcomed, thanks
Solution
I have copied and pasted the folder, and it createt a new one "folder's name - copy" and it just worked.
It was, most lilely, a problem on how the libraries got installed I hope that helps
Answered By - Nhenon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.