Installing HubSpot CLI - Vulnerabilities Error

I am trying to follow through with one of the first videos on the HubSpot CMS for Developers course; but am already falling at the first hurdle in installing the HubSpot CLI.

Using Mac.

I have used the following command as per the video: npm install @hubspot/cli

After which I have gotten errors on vulnerabilities regarding the install, I’ve checked my node version, which is showing as v20.18.0
I have also tried to run the npm audit fix and npm audit fix --force commands, but no change and no further forward.
For context, I am not running this folder inside of Herd, just locally from on my desktop, again as per the video instructions - is the video outdated or am I missing something?
Note: I did get past this issue a couple days ago, but didn’t take note of how, completely on me, it just seems the videos are potentially skimming over instructions.

For anyone else having this problem:

npm install -g @hubspot/cli@latest

I have ran this command in the terminal instead, and checked in documentation that this is a global install rather than a local one, which apparently is better suited to most users (time will tell on that one).
As per the CMS for developers video course, it does not create node_modules folder, but it seems it’s not actually needed..
It would be good if the resources were updated slightly as I’ve seen quite a few users on here struggling with the same problem, coming across dependancy errors, etc.

I’ll leave this discussion open for anyone who wants to add onto this.

Hey @Dylan_W,

thanks for sharing experience and solution/workaround.
To be honest, I don’t really remember how I’ve set up my local dev up as it’s been quite a few days :sweat_smile:

But here a few tips about setting up and working with the local dev:

  • Install the HubSpot VSCode extension (works with Cursor)

  • You can auth/add new portals with the extension or simply run hs auth in the terminal

  • As of today: If you have problems with the CLI, try a version prior to 7.4. 7.4 adds a bunch new stuff

  • Don’t perform an open heart surgery if not required. Develop in a free CMS Sandbox and push the changes to prod once they’re approved.

  • If you haven’t created a CMS Sandbox yet → developers.hubspot.com and click the big orange button “create developer account” in the header. This will give you a so-called app-developer account. It’s completely free and you can create up to 10 test accounts in one app-dev account. Those test accounts are the CMS Sandboxes. In other words: You can have up to 10 CMS Sandboxes in one account for free. Need more? Create a second app-dev account… :wink:

  • Let your local be the SOT(source-of-truth) by running hs watch local-path server-path as often as possible. If you change something in the Design-Manager, either run hs fetch server-path local-path or copy/paste it from the Design-Manager to local files

  • If you like to use GitHub, Gitlab or basically what ever git you like - it’s possible, but I recommend to not use the continuous integration as this will slow down your development flow (there was a 20-40s delay between GitHub push and uploading it to HubSpot last time I’ve checked). I’d rather recommend to install the VSCode GitHub extension or GitHub Desktop and push your changes manually (I’m a bit oldschool).

  • **You can’t fetch elements from the @hubspot or @marketplace folder.

    They’re excluded from being able to getting fetched.** Child-themes and cloned version work

Hope this helps you getting started with local dev

best,

Anton

p.s.: I’ve heard that there’s a new CMS Certification on it’s way. But I don’t know when it will be released.

Hey @Anton!
Thank you for for replying to my post, really appreciated.

Granted a lot of that went over my head as I’m only an apprentice web / front end developer :sweat_smile:, but it’ll come in handy for reference as I progress using the HubSpot CMS.

Managed to take me quite some time just getting through the CMS for Developers Certification as all the terminology is entirely new to me; but for the most part it’s starting to sink in..
It might have been something of my own wrong doing that prevented me initially getting started until I got that workaround in place, but glad to hear there’s another (updated) course coming soon; I’ll be sure to get involved in it.

Once again, thanks for the response and take care of yourself! :grin:

Sure thing!
Also - once you’re a bit more into HubL, you can check out the Mastering HubL DHUG and Code with Confidence DHUG from last year.

There are tons of super helpful tips and tricks from well-known CMS Devs that will help you get more out of HubL/HubSpot development.

best,

Anton