# Cannot fetch theme: '\[ERROR\] The account doesn't exist' when using npx hs fetch

**URL:** <https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738>\
**Category:** CMS Development\
**Created:** [October 8, 2025, 10:41am UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738 "2025-10-08T10:41:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TMisuna](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TMisuna](https://community.hubspot.com/u/TMisuna)\
**Post date:** [October 8, 2025, 10:41am UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738/1 "2025-10-08T10:41:04Z")

</div>

When I run a command like npx hs fetch --overwrite my-theme my-theme, the terminal shows the following error. Although I was able to fetch before, now it doesn’t work.  
How should I proceed to fix this issue?

[ERROR] The post in account XXX was not found. The account XXX doesn’t exist. Enter a valid ID and try again.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [October 8, 2025, 6:32pm UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738/2 "2025-10-08T18:32:33Z")

</div>

Hey @TMisuna,

verify that you’ve auth’d the account you’re fetching from.

You can run

`hs account list`

in the terminal or click the HubSpot icon in the left sidebar(VSCode/Cursor; if you got the HubSpot extension installed).

If your account is not auth’d, run

`hs auth`

and add it

If the account should be auth’d try

`npx fetch --account=[HUBID or account-name] hs-folder local-folder`

If your account has spaces in the name, I’d recommend to use the HubID

best,

Anton

---

<div class="post-metadata">

**Author:** ![TMisuna](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TMisuna](https://community.hubspot.com/u/TMisuna)\
**Post date:** [October 9, 2025, 2:13am UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738/3 "2025-10-09T02:13:33Z")

</div>

Hi @Anton  
➜ hs\_develop ✗ npx hs account list

Config path: /XXXX/XXXX

Default account: my-account

Accounts:

Name Account ID Auth Type

my-account [standard] XXX personalaccesskey

Even though I’m sure the account exists, why does the above fetch command appear?  
Also, is it possible for something like this to happen even though I haven’t made any changes recently?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [October 15, 2025, 9:28am UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738/4 "2025-10-15T09:28:57Z")

</div>

Hi @TMisuna, thanks for getting back to us and thanks so much for your help @Anton!  
Let’s see if we can get you some help: Hi [@sylvain\_tirreau](https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366), @SteveHTM and @Anton do you have suggestions to help @TMisuna, please?  
Have a great day and thanks so much!  
Bérangère

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [October 31, 2025, 8:25am UTC](https://community.hubspot.com/t/cannot-fetch-theme-error-the-account-doesnt-exist-when-using-npx-hs-fetch/140738/5 "2025-10-31T08:25:53Z")

</div>

Hi @TMisuna, getting back to you on this, thanks for your patience.  
The error “The account doesn’t exist” with npx hs fetch means the CLI can’t authenticate your HubSpot account.  
Can you please try the following steps:

1. Re-authenticate:  
Run hs account auth, generate a new Personal Access Key, and set this account as default when prompted.

2. Verify:  
Run hs accounts to confirm which accounts are authenticated. Use hs accounts use [accountName] to select the correct default.

3. Retry your fetch:  
hs fetch --overwrite my-theme my-theme

Please note that npm install -g @hubspot/cli && hs init installs the CLI globally and starts authentication, but hs account auth is now the preferred method.  
If still failing, check your Personal Access Key:  
- Navigate to your HubSpot account settings  
- Verify the Personal Access Key hasn’t expired  
- Regenerate if necessary and re-run hs account auth  
The error can occur even without recent changes if your access token expired or if there’s a mismatch between the CLI configuration and HubSpot’s authentication system.  
Also, here are some resources that might help you:  
- [Install the HubSpot CLI](https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/install-the-cli)  
- [HubSpot CLI commands (v7.6.0)](https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/reference)  
Let me know if that helped.  
Have a great weekend!  
Bérangère
