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

SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) #66

Open
dav1app opened this issue Oct 18, 2021 · 0 comments
Open

Comments

@dav1app
Copy link

dav1app commented Oct 18, 2021

For anyone that faces this issue, try updating to Node 16 and run the command again. You can just use it for this command, and then go back to your version!

There is an issue with this particular line:

// src/helper.js: 61:71
var getDependencyTree = function getDependencyTree() {
    var result = syncExec('npm ls --json ' + productionModifier);
    return JSON.parse(result.stdout).dependencies;
};

The problem is that syncExec uses a child_process.exec to execute the npm command, and depending on the size of the output, it might break due to the restrictions of the buffer size.

@JLarky JLarky mentioned this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant