sql-cli icon indicating copy to clipboard operation
sql-cli copied to clipboard

Unexpected token )

Open aziflaj opened this issue 8 years ago • 4 comments

I just installed this package using npm install -g sql-cli and when I run mssql I get this:

/path/to/.nvm/versions/node/v6.11.5/lib/node_modules/sql-cli/node_modules/password-prompt/index.js:106
  )
  ^

SyntaxError: Unexpected token )
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at /Users/aldo/.nvm/versions/node/v6.11.5/lib/node_modules/sql-cli/lib/options.js:9:22

aziflaj avatar Jan 22 '18 15:01 aziflaj

Have the same issue. Worked fine in October 2017, now it's not working. Tried installing 0.6.1 instead, but no luck.

EDIT: It's a password-prompt issue, the have a working fix currently waiting to be merged into master: https://github.com/jdxcode/password-prompt/issues/2

matlev-qhr avatar Jan 22 '18 18:01 matlev-qhr

I had the same issue, looks like there was an extra comma in line 105. I was able to fix it by editing the file: /usr/local/lib/node_modules/sql-cli/node_modules/password-prompt/index.js

And changing line 105 from options, To options

AyoobAli avatar Jan 30 '18 07:01 AyoobAli

I am getting the similar issue:

/usr/local/lib/node_modules/sql-cli/node_modules/password-prompt/index.js:8 mask: (ask, options = {}) => read.raw(ask, true, options), ^

SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at /usr/local/lib/node_modules/sql-cli/lib/options.js:9:22 at Object. (/usr/local/lib/node_modules/sql-cli/lib/options.js:111:3) at Module._compile (module.js:409:26)

haridasnykiel avatar Apr 25 '19 20:04 haridasnykiel

Managed to get it working by removing the following = {} in lines 7,8,9 and 102.

haridasnykiel avatar Apr 25 '19 20:04 haridasnykiel