CMS Development

karien
Participant

hubspot CLI installation issues

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)

0 Upvotes
7 Replies 7
KajBob
Participant

hubspot CLI installation issues

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.

UluMills
Participant

hubspot CLI installation issues

Just chiming in to say that this totally worked for me! Thank you for the advice from a forum lurker~

karien
Participant

hubspot CLI installation issues

@KajBob thx for you reply and info, will have a look into it, when i get back to it. 

Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

hubspot CLI installation issues

Hi @karien ,

 

What node version are you using? You can check by using `node -v` in the terminal.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


MNorrelokke
Participant

hubspot CLI installation issues

Hi @Teun, I got the same problem but solved it with creating the node_modules folder manually just as karien. I have node v18.12.0

0 Upvotes
KajBob
Participant

hubspot CLI installation issues

you can also do the following:

  1. go to your project folder
  2. in the commandline/terminal of vscode, type in "npm init -y"
  3. Install the hubspot npm package.
  4. run the hs commands

 this is probably the proper way to do things, instead of creating a node_modules folder.

0 Upvotes
karien
Participant

hubspot CLI installation issues

Hi @Teun 

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)

0 Upvotes