i get the same error, after struggling for 2 days.
node.js installed
hubspot cli installed
hs init not working. not any hs commands working
gives me this same error
/usr/local/lib/node_modules/@hubspot/cli/node_modules/rxjs/dist/esm5/index.js:1 export { Observable } from './internal/Observable'; ^^^^^^
SyntaxError: Unexpected token 'export' at Object.compileFunction (vm.js:344:18) at wrapSafe (internal/modules/cjs/loader.js:1048:15) at Module._compile (internal/modules/cjs/loader.js:1082:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10) at Module.load (internal/modules/cjs/loader.js:982:32) at Function.Module._load (internal/modules/cjs/loader.js:875:14) at Module.require (internal/modules/cjs/loader.js:1022:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (/usr/local/lib/node_modules/@hubspot/cli/node_modules/inquirer/lib/ui/prompt.js:7:36) at Module._compile (internal/modules/cjs/loader.js:1118:30)
I had a similar issue with the npm commands not installing the hubspot/cli. For me the problem was that the command wouldn't create a node_modules folder and for some reason that prevented the package from being installed. To get around this, I made the folder node_modules manually in my working directory, then ran the command for npm install @hubspot/cli. I'm not sure if this is your problem, it may be something else, but thats what it was for me.
sorry im only replying now, i have since moved onto something else(development on hubspot platform custom code within workflows), and i cant remember off the top of my head the version, but it was the most updated version. if needed later, ill tackle the problem again. (long story, i need to also upgrade my linux first, some dependancies i needed couldnt install)