Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncu -g fails with Snap binary: child_process.spawn produces empty string #27557

Closed
kleinfreund opened this issue May 3, 2019 · 1 comment
Closed
Labels
wrong repo Issues that should be opened in another repository.

Comments

@kleinfreund
Copy link

I switched from the PPA binary (https://github.com/nodesource/distributions/blob/master/README.md#debinstall) to the snap binary (https://snapcraft.io/node). This started to break the ncu -g command. Originally, I opened an issue with npm-check-updates, but it doesn’t seem to be an issue on their end (for reference: raineorshine/npm-check-updates#536).

Only with the snap binary do I get the following error:

/home/phil/.npm-global/lib/node_modules/npm-check-updates/lib/npm-check-updates.js:387
        throw err;
        ^

Error: Expected JSON from "npm ls". This could be due to npm instability.


    at parseJson (/home/phil/.npm-global/lib/node_modules/npm-check-updates/lib/package-managers/npm.js:38:15)
    at /home/phil/.npm-global/lib/node_modules/npm-check-updates/lib/package-managers/npm.js:144:30
    at processTicksAndRejections (internal/process/task_queues.js:89:5)

The command that is executed with child_process.spawn is npm ls --global --depth=0 --json which produces the correct JSON with both the PPA and the snap binary when executed directly from the terminal.

@mscdex
Copy link
Contributor

mscdex commented May 3, 2019

This should be posted to NodeSource's issue tracker instead.

@mscdex mscdex closed this as completed May 3, 2019
@mscdex mscdex added the wrong repo Issues that should be opened in another repository. label May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wrong repo Issues that should be opened in another repository.
Projects
None yet
Development

No branches or pull requests

2 participants