我刚刚使用命令在 Ubuntu 16.04 上安装了 localtunnel sudo npm install -g localtunnel
,但是在尝试执行它时出现错误。
$ lt --port 8080
/usr/local/lib/node_modules/localtunnel/bin/lt.js:8
const { version } = require('../package');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
$ npm -version
3.5.2
$ lt --help
/usr/local/lib/node_modules/localtunnel/bin/lt.js:8
const { version } = require('../package');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
如何让它工作?