ReferenceError: Cordova is not defined at package.js

Hi

I tried to create a codova app with a plugin that I have, but failed miserably. To recreate the problem, i just followed the guides:

meteor create cordova-plugin-test
meteor add-platform ios
meteor run ios

–> all good

Add a plugin according to the guide (http://docs.meteor.com/#/full/Cordova-depends), into package.js:

Cordova.depends({
  "cordova-plugin-camera": "1.2.0"
});

start it again

meteor run ios

result:

W20160119-12:08:47.244(1)? (STDERR) .../meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160119-12:08:47.244(1)? (STDERR) 						throw(ex);
W20160119-12:08:47.244(1)? (STDERR) 						      ^
W20160119-12:08:47.248(1)? (STDERR) ReferenceError: Cordova is not defined
W20160119-12:09:34.590(1)? (STDERR)     at package.js:1:1

The same error happens on Andorid. What am I doing wrong?

Thanks! Lukas

I also have the same issue. Any ideas anyone?

What version of Meteor are you running? Could it be one of the 1.3 betas?

Nah, I’m still rockin’ 1.2.1

I figured it out - these steps are only needed if you’re building a cordova
package for meteor yourself.

Else its just

meteor add cordova:org.apache.cordova.camera@Version/GIT

Ah, right, you were adding a package.js as part of the app instead of a package! Now it makes sense.