question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using analytics throws some warnings

See original GitHub issue

If I try to use analytics importing firebase like this, it doesn’t have analytics in autocomplete:

import { firebase } from '@nativescript/firebase';

So, I’m importing it like this:

import * as firebase from '@nativescript/firebase'; With this kind of import, it does provide analytics in autocomplete, but there’s warnings being shown while building the app:

WARNING in ./app/services/xxx.service.ts 20:12-30
"export 'analytics' (imported as 'firebase') was not found in '@nativescript/firebase'
 @ ./app/modules/main/services/yyy.service.ts
 @ ./app/app.module.ts
 @ ./main.ts

I’m using @nativescript/firebase version 11.0.0.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

6reactions
timdoegecommented, Oct 22, 2020

Import analytics like this instead:

import { analytics } from '@nativescript/firebase/analytics';
4reactions
tomtasticocommented, Nov 25, 2021

@timdoege thanks for the tip, this fixed it for me for various packages. I was importing directly from @nativescript/firebase and while Visual Studio Code seems happy with that (doesn’t complain there is no export) it fails while building. Importing from the subfolder of the package fixes it.

Seems this is only for the packages that have their own folder in https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/src as for example firestore can be imported directly from @nativescript/firebase, not @nativescript/firebase/firestore.

So as of now, I think you have to import individually:

  • admob
  • analytics
  • crashlytics
  • functions
  • inappmessaging
  • messaging
  • mlkit
  • performance
  • storage
Read more comments on GitHub >

github_iconTop Results From Across the Web

Analytics is throwing Java warnings after upgrading Java to ...
Issue/Introduction. Since upgrading Java to OpenJDK11, there are java warnings (systemd-logging), although the IA agent seems to work properly:.
Read more >
How to deal with errors and warnings in productive R code
Invalid, inconsistent, incomplete or noncompliant input data run directly in R can still produce a partial result, but might throw a warning ......
Read more >
Oops! Google's SSL Certificate Throwing Out Scary Warnings
Everyone is noticing that when they go to their Google Account through AdWords, AdSense, Analytics, or any Google page that requires SSL, ...
Read more >
Google Analytics Data: 10 Warning Signs Your Data Isn't ...
According to Moehring, “For Google Analytics to be useful, the data needs to be clean, accurate, and segmented to isolate relevant traffic.
Read more >
The Warning Signs You Need Better Analytics at Your Company
In a lot of ways, data work and analytics are very similar. ... data work is done, they throw the data into some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found