kbshl/alfred-vscode

"Unexpected token" error upon initial setup (Alfred 4)

KurtTrowbridge opened this issue · 2 comments

Not sure if this is just user error, but I get an error whenever I try to use alfred-vscode, pasted below, that prevents me from using it. I only started using Alfred with version 4 a few weeks ago, so I'm not upgrading from an older version or anything. I also globally reinstalled the plugin tonight after seeing the update to alfy from earlier in the week.

Following the directions on this issue, I tried adding nodePath as an environment variable with the value /Users/kurt/.nvm/versions/node/v8.1.3/bin/node, but that didn't change anything.

/Users/kurt/.nvm/versions/node/v8.1.3/lib/node_modules/alfred-vscode/lib/path-utils.js:63
    .map(item => ({ ...item, description: exports.expandHomePath(item.description) }));
                    ^^^
SyntaxError: Unexpected token ...
    at Object.<anonymous> (/Users/kurt/.nvm/versions/node/v8.1.3/lib/node_modules/alfred-vscode/lib/utils.js:5:37)

Object rest spread requires Node.js 8.6.0 or later.

I tried reinstalling the package first using Node v8.9.4, then v9.11.2, then v10.16.0 (just to see if anything would change), and tried setting the nodePath variable to those paths, but I still get the same error (but with the new Node version) regardless. What else do I need to do?