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.

Nativescript 7 and barcode scanner 4.0.0

See original GitHub issue

Hi,

I tried the new package but receiving following error:

CONSOLE ERROR: ERROR Error: Uncaught (in promise): ReferenceError: NativeClass is not defined
ReferenceError: NativeClass is not defined
at Object.../node_modules/nativescript-barcodescanner/barcodescanner.js (file: node_modules/nativescript-barcodescanner/barcodescanner.ios.js:446:0)
at __webpack_require__ (file: src/webpack/bootstrap:74:0)
at Object../app/features/shared/components/scanner/scanner.provider.ts (file: src/app/features/shared/components/scanner/scanner.provider.ts:1:0)

so the problem comes already from the import:

import { BarcodeScanner } from ‘nativescript-barcodescanner’; -> scanner.provider.ts:1:0

Seems like he doesn’t know about this line of code:

QRCodeReaderDelegateImpl = QRCodeReaderDelegateImpl_1 = __decorate([
    NativeClass
], QRCodeReaderDelegateImpl);
```
I was already doing a `ns clean`

Any idea what could be the problem?

```
"dependencies": {
    "@nativescript/angular": "10.1.0",
    "@nativescript/core": "7.0.3",
    "@nativescript/firebase": "^11.0.0-rc.5",
    "@nativescript/shared-notification-delegate": "^1.0.0",
    "@nativescript/theme": "~2.5.0",
    "nativescript-barcodescanner": "^4.0.0",
    "nativescript-dev-version": "^0.2.0",
    "nativescript-numeric-keyboard": "^4.3.1",
    "nativescript-ui-listview": "^9.0.2"
  },
  "devDependencies": {
    "@nativescript/android": "~7.0.0",
    "@nativescript/ios": "7.0.0",
    "@nativescript/types": "~7.0.3",
    "@nativescript/webpack": "3.0.4"
  },
```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
NathanWalkercommented, Sep 22, 2020

@EddyVerbruggen i can help ya out here. just a moment.

0reactions
AjiteshMDKcommented, Feb 16, 2022

Hi @NathanWalker Hi @EddyVerbruggen Hi @mwagena ,

I’m also having the same issue. Any idea what exactly i’m missing and how to fix this? Any pointer would be really helpful.

Link to my repo. - https://github.com/AjiteshMDK/GeoLocation-Update/

NativeScript encountered a fatal error: Uncaught ReferenceError: NativeClass is not defined image

Read more comments on GitHub >

github_iconTop Results From Across the Web

nativescript-barcodescanner
NativeScript BarcodeScanner. Build Status NPM version Downloads Twitter Follow. Plugin version 4.0.0+ is compatible with NativeScript 7+.
Read more >
Nativescript 7 and barcode scanner 4.0.0 - Bountysource
Hi,. I tried the new package but receiving following error: CONSOLE ERROR: ERROR Error: Uncaught (in promise): ReferenceError: NativeClass ...
Read more >
Hide soft keyboard for specific TextField in Nativescript
My goal is to have a hidden Textfield which maintains focus so it can receive input from a Bluetooth barcode scanner.
Read more >
Barcode Scanner - npm - Socket.dev
You can use the BarcodeScanner plugin to scan different types of barcodes (using the ... A cross platform HTML5 QR Code & bar...
Read more >
NativeScript - Twitter
Tweets & replies ... Uses the miracle of @nativescript/canvas! ... Nativescript seems like the true JavaScript cross platform mobile app framework, ...
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