cordovaPreferences error: cannot read property 'plugins' of undefined

Hi,
I am trying to use Cordova Preference plugin, but when I set a pref I get the error in the subject (either in browser or in emulator).

How can I solve it?

Thanks.

Most of the plugins only work on devices. None of them will work in a browser and only some of them will work in emulators.

I tried it on device, I got same results…:(((