NativeScript / firebase

Modular Firebase 🔥 implementation for NativeScript. Supports both iOS & Android platforms for all Firebase services.
https://docs.nativescript.org/plugins/firebase-core.html
Apache License 2.0
54 stars 47 forks source link

Failed to find module: "@nativescript/firebase-admob" #136

Closed aymenelhajayed closed 1 year ago

aymenelhajayed commented 1 year ago

`"dependencies": {

"@angular-devkit/build-angular": "14.2.3",
"@angular/animations": "14.2.3",
"@angular/common": "14.2.3",
"@angular/core": "14.2.3",
"@angular/forms": "14.2.3",
"@angular/platform-browser": "14.2.3",
"@angular/platform-browser-dynamic": "14.2.3",
"@angular/router": "14.2.3",
"@danvick/ngx-translate-nativescript-loader": "3.0.1",
"@nativescript/angular": "14.2.3",
"@nativescript/core": "8.3.5",
"@nativescript/email": "^2.0.5",
"@nativescript/firebase-admob": "2.0.0",
"@nativescript/firebase-analytics": "2.0.0",
"@nativescript/firebase-core": "2.0.0",
"@nativescript/firebase-installations": "2.0.0",
"@nativescript/secure-storage": "^3.0.0",
"@nativescript/social-share": "^2.0.4",
"@nativescript/theme": "~3.0.0",
"@ngx-translate/core": "^13.0.0",
"copyfiles": "^2.4.1",
"nativescript-dna-deviceinfo": "^3.7.1",
"nativescript-email": "^1.6.0",
"nativescript-openurl": "^1.0.2",
"nativescript-phone": "^3.0.1",
"nativescript-social-share": "^1.6.0",
"rimraf": "^3.0.2",
"rxjs": "~7.5.0",
"zone.js": "~0.11.5"

}, "devDependencies": { "@angular-devkit/build-angular": "~14.2.0", "@angular/compiler": "14.2.3", "@angular/compiler-cli": "~14.2.0", "@nativescript/android": "8.1.1", "@nativescript/ios": "8.3.3", "@nativescript/types": "~8.3.0", "@nativescript/webpack": "~5.0.6", "@ngtools/webpack": "~14.2.0", "typescript": "~4.7.0" },`

I tried many times to reset the project with command ns clean then ns platform add Android ns run android . node version : v14.18.1 Then i get always the same Error on Refreshing application on device :

JS: bootstrap: Error bootstrapping app module:
JS: Could not load view for: BannerAd.Error: com.tns.NativeScriptException: Failed to find module: "@nativescript/firebase-admob", relative to: app/tns_modules/
aymenelhajayed commented 1 year ago

I was able to solve the issue. Since am using html / nativescript and not xml I had to register the BannerAd element in the module: registerElement('BannerAd', () => require('@nativescript/firebase-admob').BannerAd);