pkg is not defined when using Plugman

1k views Asked by At

I'm getting pkg is not defined when attempting to sudo plugman createpackagejson {path of plugin} I can see there's plenty on Github about this issue but no precise directions on work around or how to fix it. Please could someone advise?

4

There are 4 answers

0
jamesim On

So apparently this has been addressed, but a fix has not been released, yet. https://github.com/apache/cordova-lib/pull/597 .

1
Yu Zhang On

I met the same issue when using keymob-plugin.

This issue was fixed with pull request which already merged into master but not published yet,maybe it will be available with the next release of cordova-lib.

For now you can create package.json manually because the content of package.json depends on plugin.xml. You can also read the package.json in other 3rd plugins and the npm documentation of package.json .

0
Victor Ionescu On

It's not working for me either. I've created it with

npm init

and manually entered the information requested.

0
mike nelson On

This seems to have been fixed. It stopped saying this error when I updated plugman using

npm install plugman

However, then it said another error. It's pretty poor practise that there is no effort towards making plugins backwards compatible.