Skip to content

Odd behaviour with Cordova plugin add operation using node snap #55

Open
@dlbeswick

Description

@dlbeswick

Hello all, I have raised this issue with the Cordova maintainers here: apache/cordova#423

But, I suspect it's actually an issue with the snap as the problematic command works fine using an nvm install.

To repro this issue:

  1. mkdir test
  2. cd test
  3. npm install cordova
  4. npx cordova create test org.test test
  5. npx cordova plugin add cordova-plugin-device

Expected:

The Cordova plugin is installed and Cordova reports Adding cordova-plugin-device to package.json

Actual:

The message Unexpected end of JSON input is returned and no plugin is added.

The cause is that no stdout seems to be received from the shell call (via the execa package) that Cordova makes to npm. exec returns a successful zero error code. In addition, modifying the shell call to operate via bash shell redirection does yield some output, along with some additional error information. Please see the linked issue for more details and please do let me know if you need any more information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions