NativeScript: [Angular 10] Cannot call a class constructor without |new|

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.8.0
  • Cross-platform modules:7.0.0-rc.50
  • Android Runtime:6.5.3
  • iOS Runtime:6.5.2
  • Plugin(s): @Nativescript/firebase 11.0.0-rc.0

Describe the bug When attempting to update to Angular 10 I get this error from the @Nativescript/firebase plugin.

JavaScript error:
file: node_modules/@nativescript/core/data/observable/index.js:17:4: JS ERROR TypeError: Cannot call a class constructor without |new|
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: Cannot call a class constructor without |new|
at
s(file: node_modules/@nativescript/core/data/observable/index.js:17:4)
at t(file: node_modules/nativescript-shared-notification-delegate/shared-notification-delegate.common.js:7:47)
at t(file: node_modules/nativescript-shared-notification-delegate/shared-notification-delegate.ios.js:23:32)
at ../node_modules/nativescript-shared-notification-delegate/shared-notification-delegate.js(file: node_modules/nativescript-shared-notification-delegate/shared-notification-delegate.ios.js:181:19)
at k(file: src/webpack/bootstrap:753:26)
at r(file: src/webpack/bootstrap:120:31)
at ../node_modules/@nativescript/firebase/messaging/messaging.js(file: node_modules/@nativescript/firebase/messaging/messaging.ios.js:4:58)
at k(file: src/webpack/bootstrap:753:26)
at r(file: src/webpack/bootstrap:120:31)
at ../node_modules/@nativescript/firebase/firebase.js(file: node_modules/@nativescript/firebase/firebase.ios.js:8:32)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

@NathanWalker no rush, I’m just starting the process. Congrats on 4 years! My wife and I just hit that last week.

@NathanWalker I just committed those packages.

Excellent thanks @alexgritton - I’ll post back here as some in your list are updated starting with a few that were just updated now and scoped as well as some already updated (same usage on these, just update your package to use these and update your imports to use them):

@nativescript/local-notifications: "~5.0.0",
@nstudio/nativescript-cardview: "~2.0.0",
@nativescript/email: "~2.0.0",
@nativescript/imagepicker: "~1.0.0",
@nativescript/iqkeyboardmanager: "~2.0.0",
@nstudio/nativescript-pulltorefresh: "~3.0.0",

“nativescript-signalr-core”: “file:nativescript-signalr-core-2.0.0.tgz” – There was a pr that was merged last week here and just awaiting an update publish from the author but you can download a tgz pack of the changes needed here: https://drive.google.com/file/d/11dbrKGCDLplFpKBWurvShsBTqwHBPmBs/view?usp=sharing

After updating all those and just updating your imports to use those lemme know how things are looking for ya to see what’s left 👍

@alexgritton its already updated. Just use @nativescript/firebase “rc”

And use as follows:

import { firebase } from @nativescript/firebase