Cannot find name 'Hotspot'


#1

Hey,

I am using Visual Studio Code with Cordova extension.

I created a new blank project (ionic start xxx blank --v2) and when i try to use any ionic native plugin (cordova plugin add xxx), I always get a compile error:

import { Hotspot, HotspotNetwork } from ‘@ionic-native/hotspot’;

export class HelloIonicPage {
constructor(private hotspot: Hotspot) {

}
}

–> Cannot find name ‘Hotspot’.

Its added and imported ‘Hotspot’ in app.module.ts file as well. It happens with every plugin and i don’t know what to do. I can’t debug and test.

Plz help and thanks in advance.

Greetings.


#2

Have you installed the corresponding Ionic Native package for the plugins?

e.g.
npm install --save @ionic-native/hotspot


#3

wow my bad! works now.

thanks for helping.