cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13451) "pkg not defined" exception when running plugman with createpackagejson command-line
Date Wed, 18 Oct 2017 20:14:00 GMT


ASF GitHub Bot commented on CB-13451:

Github user OminousWater commented on the issue:
    OK I understand the problem better now. init-package-json (a separate npm module) initialises
the global variable 'package' in init-package-json.js. So ideally init-package-json would
use a different variable name, but I guess the maintainers of that package might not have
as strict a requirement as the cordova-lib maintainers. I've opened a separate pull request
with a compromise solution here:, hopefully
they will accept (or have a better solution).

> "pkg not defined" exception when running plugman with createpackagejson command-line
> ------------------------------------------------------------------------------------
>                 Key: CB-13451
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>            Reporter: Roland
>            Priority: Minor
> NOTE: I am about to submit a pull request with a fix for this issue. Description follows:
> A global js-lint pass on the cordova-lib codebase on the 30/8/2017 caused references
to the global 'package' variable in init-default.js to be renamed to 'pkg', presumably because
the cordova-lib source doesn't declare a global variable called 'package' but _does_ declare
a global variable called 'pkg' (in cordova/info.js). However in this case, the 'package' variable
refers to the one declared in the plugman source, specifically main.js, so it should have
stayed as 'package'. To test the fix, run:
> 	plugman createpackagejson .
> Without the fix, this will trigger the following exception: 'pkg is not defined'. Having
patched in the fix, running the command line should work as expected, prompting the user with
questions and then spitting out a package.json file.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message