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

Error in vtop #125

Closed
Sleedyak opened this issue Jun 17, 2018 · 3 comments
Closed

Error in vtop #125

Sleedyak opened this issue Jun 17, 2018 · 3 comments

Comments

@Sleedyak
Copy link

Sleedyak commented Jun 17, 2018

I've recently found about vtop, and from what I've seen it looked really cool. But after like 1 second of launching, the following error occured:

SyntaxError: Unexpected token ILLEGAL
    at Object.exports.runInNewContext (vm.js:48:16)
    at safeEval (/usr/local/lib/node_modules/vtop/node_modules/safe-eval/index.js:13:6)
    at /usr/local/lib/node_modules/vtop/upgrade.js:25:24
    at ChildProcess.exithandler (child_process.js:191:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:862:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)```
@vhfmag
Copy link

vhfmag commented Jun 23, 2018

I've been stuck with that error for months now and almost abandoned vtop 😞

But I've just found the issue: in upgrade.js, the shell command npm --color=false info vtop is ran and its output is fed into safe-eval, as it's expected that the npm-view output should be a JSON. But the behavior changed as of v8, and now, to get a JSON output, a --json flag must be given (e.g. npm --color=false info vtop --json).

The good news is that this should be an easy fix. I'll just examine v7 compatibility with the new json flag and probably land a PR.

@vhfmag
Copy link

vhfmag commented Jun 23, 2018

Actually, that seems like a duplicate of #121 and the #123 PR should fix it. @Sleedyak, check out the vtop-node10 package published by @williamboman as a temporary fix.

@MrRio
Copy link
Owner

MrRio commented Jun 23, 2018

This is now fixed in v0.6.0. Thanks for your patience! :)

@MrRio MrRio closed this as completed Jun 23, 2018
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

3 participants