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.

Build fail on nativescript 7

See original GitHub issue

I have NS7 and everything is working properly, but when I try to build for release I get this error:

ERROR in node_modules/@nativescript/firebase/messaging/messaging.d.ts:1:10 - error TS2305: Module '"../firebase"' has no exported member 'Message'.

1 import { Message, MessagingOptions } from '../firebase';
           ~~~~~~~
node_modules/@nativescript/firebase/messaging/messaging.d.ts:1:19 - error TS2305: Module '"../firebase"' has no exported member 'MessagingOptions'.

1 import { Message, MessagingOptions } from '../firebase';

I am using the new @nativescript/firebase plugin, and have used the following import in app.component.ts:

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

I have looked at the file in question (messaging.d.ts), and the intellisense is showing there is no exported member for Message or MessagingOptions, even though I can see them being exported in the firebase.d.ts file.

This is stopping me from being able to push a new version live. Any ideas?

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
tigerdicommented, Oct 7, 2020

None of the nativescript.config.ts things applied to mine, but adding "skipLibCheck": true to tsconfig.json seems to have worked. I did think there must be an option for Typescript to ignore these false errors, and completely forgot about this option.

Many thanks!

1reaction
mloaizaucommented, Jul 12, 2021

Replace: import { Message } from "@nativescript/firebase";

with: import { firebase } from "@nativescript/firebase";

And update the references to Message to be firebase.Message

this work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - NativeScript Docs
Problem: After switching branches your app no longer builds, or does not display new changes. Solution: The NativeScript CLI generates platform-specific native ...
Read more >
Native script : Build fails on iOS when migrating from 6.5 to ...
Native script : Build fails on iOS when migrating from 6.5 to 7.0 · 1. Using Xcode 11 - You need to use...
Read more >
Update NativeScript 7 app to 8.0 - YouTube
Updating to NativeScript's latest version is easier than it may seem using ns migrate but there's a few things to check like your...
Read more >
MDK Client local build error
At a first glance I would say that your computer might not have the appropriate NativeScript dependencies installed and that's causing your CLI ......
Read more >
nativescript-community/sentry
A cross-platform application monitoring tool, with a focus on error reporting.. Latest version: 4.6.7, last published: 4 hours ago.
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