# Ionic Native Barcode Scanner "Property 'scan' does not exist on type 'BarcodeScanner'

**URL:** <https://forum.ionicframework.com/t/ionic-native-barcode-scanner-property-scan-does-not-exist-on-type-barcodescanner/97087>\
**Category:** Ionic Native\
**Created:** [July 5, 2017, 9:38pm UTC](https://forum.ionicframework.com/t/ionic-native-barcode-scanner-property-scan-does-not-exist-on-type-barcodescanner/97087 "2017-07-05T21:38:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![D4rkMindz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/d4rkmindz/32/111153_2.png) [@D4rkMindz](https://forum.ionicframework.com/u/D4rkMindz)\
**Post date:** [July 5, 2017, 9:38pm UTC](https://forum.ionicframework.com/t/ionic-native-barcode-scanner-property-scan-does-not-exist-on-type-barcodescanner/97087/1 "2017-07-05T21:38:36Z")

</div>

Hello.  
I use:  
Ionic Framework 3.2.1  
Ionic Native ^2.9.0  
Ionic App Scripts 1.3.7  
Angular Core: 4.1.0  
Angular Compiler CLI 4.1.0  
Node: 6.10.3  
OS: Windows 10  
Navigator Platform Linux aarch64

I’ve recently installed the [Barcode-Scanner](https://ionicframework.com/docs/native/barcode-scanner/) ionic native plugin. I followed the description step by step. But it does not matter, if i change anything. Everytime, i run “ionic cordova run android -l” to debug on my connected Samsung S7, i get following error message.

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/1/91bca7ab183754f0ec5797b04f05babe0491fc5e.png)  
My code looks like the following:

```auto
//AppModule.ts
import {BrowserModule} from '@angular/platform-browser';
import {ErrorHandler, NgModule} from '@angular/core';
import {IonicApp, IonicErrorHandler, IonicModule} from 'ionic-angular';

import {CeviApp} from './app.component';
import {HomePage} from '../pages/home/home';
import {ListPage} from '../pages/list/list';
import {LoginPage} from "../pages/login/login";
import {AddItemPage} from "../pages/add-item/add-item";

import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';
import {Auth} from '../providers/auth/auth';
import {HttpModule} from "@angular/http";
import {CreateAccountPage} from "../pages/create-account/create-account";
import {ListServiceProvider} from '../providers/list-service/list-service';
import {Camera, BarcodeScanner} from 'ionic-native';
import {AddItemsServiceProvider} from '../providers/add-items-service/add-items-service';
import {PostDataServiceProvider} from '../providers/post-data-service/post-data-service';
import {ConfigProvider} from '../providers/config/config';
import {GetDataServiceProvider} from '../providers/get-data-service/get-data-service';
import {CityDataProvider} from '../providers/city-data/city-data';
import {CreateAccountSecondPage} from "../pages/create-account-second/create-account-second";
import {ViewItemPage} from "../pages/view-item/view-item";
import { ScannerProvider } from '../providers/scanner/scanner';

@NgModule({
  declarations: [
    HomePage,
    ListPage,
    LoginPage,
    AddItemPage,
    CreateAccountPage,
    CreateAccountSecondPage,
    ViewItemPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(CeviApp),
    HttpModule,
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    HomePage,
    ListPage,
    LoginPage,
    AddItemPage,
    CreateAccountPage,
    CreateAccountSecondPage,
    ViewItemPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    Auth,
    ListServiceProvider,
    Camera,
    AddItemsServiceProvider,
    PostDataServiceProvider,
    ConfigProvider,
    GetDataServiceProvider,
    CityDataProvider,
    BarcodeScanner,
    ScannerProvider
  ]
})
export class AppModule {
}

//ListPage.html
    this.barcodeScanner.scan().then((barcodeData) => {
      // Success! Barcode data is here
    }, (err) => {
      // An error occurred
    });

```

---

<div class="post-metadata">

**Author:** ![saimon](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/saimon/32/133587_2.png) [@saimon](https://forum.ionicframework.com/u/saimon)\
**Post date:** [July 6, 2017, 11:03am UTC](https://forum.ionicframework.com/t/ionic-native-barcode-scanner-property-scan-does-not-exist-on-type-barcodescanner/97087/2 "2017-07-06T11:03:19Z")

</div>

Inside your list page you need to make sure that you import the barcode scanner and make it available through the constructor like:

```auto
import { BarcodeScanne r} from '@ionic-native/barcode-scanner';

constructor(barcodeScanner: BarcodeScanner)

```

Also your code looks like your are using the old full Ionic Native package, right?

The new approach has all of the plugins in single packages, so perhaps that is also a problem!

[Check out the documentation](http://ionicframework.com/docs/native/barcode-scanner/) for a full guide how to add the barcode scanner.

---

<div class="post-metadata">

**Author:** ![D4rkMindz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/d4rkmindz/32/111153_2.png) [@D4rkMindz](https://forum.ionicframework.com/u/D4rkMindz)\
**Post date:** [September 1, 2017, 8:35am UTC](https://forum.ionicframework.com/t/ionic-native-barcode-scanner-property-scan-does-not-exist-on-type-barcodescanner/97087/3 "2017-09-01T08:35:11Z")

</div>

Thank you. I was using the old package and also forgot it to include. . .
