# CMS CLI installation issues

**URL:** <https://community.hubspot.com/t/cms-cli-installation-issues/23200>\
**Category:** CMS Development\
**Tags:** design-manager\
**Created:** [July 21, 2020, 4:57pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200 "2020-07-21T16:57:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DirtyBirdDesign](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dirtybirddesign/32/29368_2.png) [@DirtyBirdDesign](https://community.hubspot.com/u/DirtyBirdDesign)\
**Post date:** [July 21, 2020, 4:57pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/1 "2020-07-21T16:57:57Z")

</div>

Installation should be simple, as it is very straightforward. Im sure Im overlooking something obvious, would appreciate any help from others who have encountered the same.

1. I have NPM installed

 ![29488i9229EEB4CFEC6226.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/c/c5a4ed191a05065d34c9c682e77f19d536dd9e9f.png)

1. I try and install using npm install -g @hubspot/cms-cli  

2. Using hs init returns “zsh: command not found: hs”

3. Using npm list it shows empty  
 ![29482iB151811E585717A0.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/3/e3518f8a4575268a81c198ced1b33c18a8a56278.png)

4. Moving to my project directory, it shows hubspot installed, but nothing underneath it  

5. I try installing in project directory, same issue. It shows HubSpot installed with nothing underneath it and hs init returns the same “zsh: command not found:hs” message.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [July 23, 2020, 8:40am UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/2 "2020-07-23T08:40:46Z")

</div>

Hey @DirtyBirdDesign

Thank you for the information provided. I’ll tag a few experts.

Hey @stefen @Jsum @prosa what would you advise in this case?

Thanks

Sharon

---

<div class="post-metadata">

**Author:** ![SandyG1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sandyg1/32/77083_2.png) [@SandyG1](https://community.hubspot.com/u/SandyG1)\
**Post date:** [July 23, 2020, 9:49am UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/3 "2020-07-23T09:49:49Z")

</div>

Hi @DirtyBirdDesign

Try

`npx hs init`

Sandy  
 ![16x16_smiley-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a83ec960612094a57cfb392e21c202c8e77b967c.png)

---

<div class="post-metadata">

**Author:** ![DirtyBirdDesign](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dirtybirddesign/32/29368_2.png) [@DirtyBirdDesign](https://community.hubspot.com/u/DirtyBirdDesign)\
**Post date:** [July 23, 2020, 4:30pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/4 "2020-07-23T16:30:21Z")

</div>

Thank you Sandy. I ran npx his init, and this was shown

`npx: installed 59 in 5.121s`

is that expected?

---

<div class="post-metadata">

**Author:** ![SandyG1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sandyg1/32/77083_2.png) [@SandyG1](https://community.hubspot.com/u/SandyG1)\
**Post date:** [July 23, 2020, 5:00pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/5 "2020-07-23T17:00:57Z")

</div>

Oh, that’s not quite right! It looks like you’ve not initiated npm correctly and installed the cli dependancy

---

<div class="post-metadata">

**Author:** ![DirtyBirdDesign](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dirtybirddesign/32/29368_2.png) [@DirtyBirdDesign](https://community.hubspot.com/u/DirtyBirdDesign)\
**Post date:** [July 23, 2020, 5:03pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/6 "2020-07-23T17:03:39Z")

</div>

Nothing happens after - according to the documentation here [Build a classic HubL theme - HubSpot docs](https://developers.hubspot.com/docs/cms/guides/getting-started) I should be prompted to create a key and to set up the account.

---

<div class="post-metadata">

**Author:** ![SandyG1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sandyg1/32/77083_2.png) [@SandyG1](https://community.hubspot.com/u/SandyG1)\
**Post date:** [July 23, 2020, 5:08pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/7 "2020-07-23T17:08:00Z")

</div>

Have you initiated a node package module?

**for example** do you have this package.json in the root of your project?

```auto
{
 "name": "theme-2020",
 "version": "0.0.1",
 "description": "hubid",
 "main": "index.js",
 "scripts": {
 "start": "npx hs init",
 "create-theme": "npx hs create website-theme ${npm_package_name}",
 "watch": "npx hs watch ./${npm_package_name} ${npm_package_name} --remove",
 "create-module": "./hs-create-module.sh ${npm_package_name}",
 "delete": "npx hs remove ${npm_package_name}"
 },
 "repository": {
 "type": "git",
 "url": "git+https://github.com/andanotherday/hubid-hs.git"
 },
 "author": "andanotherday.com",
 "license": "ISC",
 "bugs": {
 "url": "https://github.com/andanotherday/hubid-hs/issues"
 },
 "homepage": "https://github.com/andanotherday/hubid-hs#readme",
 "dependencies": {
 "@hubspot/cms-cli": "^1.1.9"
 }
}

```

---

<div class="post-metadata">

**Author:** ![DirtyBirdDesign](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dirtybirddesign/32/29368_2.png) [@DirtyBirdDesign](https://community.hubspot.com/u/DirtyBirdDesign)\
**Post date:** [July 23, 2020, 5:11pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/8 "2020-07-23T17:11:29Z")

</div>

All it has in it is this

```auto
{
 "name": "@hubspot/cms-cli",
 "version": "1.0.0",
 "description": "Hubspot CMS CLI",
 "main": "index.js",
 "scripts": {
 "test": "hs init"
 },
 "repository": {
 "type": "git",
 "url": "@hubspot/cms-cli"
 },
 "keywords": [
 "Hubspot",
 "CMS",
 "CLI"
 ],
 "author": "HubSpot",
 "license": "ISC"
}

```

I am just dollowing the documentation - perhaps too literally - and didn’t see what was described as the next step. I apologize for my ignorance here - I usually stick to the ruby and homebrew pkg management environments.

---

<div class="post-metadata">

**Author:** ![SandyG1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sandyg1/32/77083_2.png) [@SandyG1](https://community.hubspot.com/u/SandyG1)\
**Post date:** [July 23, 2020, 5:12pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/9 "2020-07-23T17:12:13Z")

</div>

if not, you’ll need to follow these steps as a prerequisite

1 **npm init**

2 **npm install @hubspot/cms-cli**

3 **npx hs init**

Ah! I see what you’ve done 🙂 haha

You need a new folder mate, sorry to tell you.. Clear it out. and follow this  
 ![16x16_man-wink.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/8/98806a7febcff95d289b6046762f6ff7b1c6d73b.png)

---

<div class="post-metadata">

**Author:** ![DirtyBirdDesign](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dirtybirddesign/32/29368_2.png) [@DirtyBirdDesign](https://community.hubspot.com/u/DirtyBirdDesign)\
**Post date:** [July 23, 2020, 5:26pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/10 "2020-07-23T17:26:37Z")

</div>

Sandy, thank you very much. You should write the documentation! Very much appreciated!

---

<div class="post-metadata">

**Author:** ![SandyG1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sandyg1/32/77083_2.png) [@SandyG1](https://community.hubspot.com/u/SandyG1)\
**Post date:** [July 23, 2020, 5:37pm UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/11 "2020-07-23T17:37:51Z")

</div>

aha, you’re welcome 🙂  
Just for yours and others references:

Running **npm install -g @hubspot/cms-cli** should have worked, however as I’m running a project that will be shared between people. My steps require hubspot-cli to be in the project root. This means that it will automatically install hubspot cli for everyone that works on this project with me.

Enjoy!

---

<div class="post-metadata">

**Author:** ![lochwooe](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@lochwooe](https://community.hubspot.com/u/lochwooe)\
**Post date:** [January 27, 2024, 12:15am UTC](https://community.hubspot.com/t/cms-cli-installation-issues/23200/12 "2024-01-27T00:15:14Z")

</div>

Finally it works! Thank you
