# A TypeError has occurred - hs auth process

**URL:** <https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759>\
**Category:** CMS Development\
**Tags:** local-development\
**Created:** [June 6, 2024, 12:11am UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759 "2024-06-06T00:11:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [June 6, 2024, 12:11am UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759/1 "2024-06-06T00:11:45Z")

</div>

I am trying to add a new portal to my config file and started getting the following error when entering the personal access key:

[ERROR] A TypeError has occurred. Cannot read properties of null (reading ‘replace’)

Using VS Code for my local dev and here are my current versions:

CLI - 5.2.0

Node - 20.14.0

I have never had any issues using the ‘hs auth’ process before. Not sure why this error has suddently appeared. Any recommendations for troubleshooting would be greatly appreciated.

Thanks,

Terry McMillan

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 6, 2024, 3:37pm UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759/2 "2024-06-06T15:37:02Z")

</div>

Hi @tmcmillan99 👋 I hope you’ve been well. Let’s invite some community members to the converstaion — hey @Jnix284 @piersg @Teun have you run into this or a similar issue before?

Thank you for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [June 6, 2024, 7:24pm UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759/3 "2024-06-06T19:24:55Z")

</div>

[@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) Thanks for reaching out to others. Not sure of a work around and this prevents me from uploading a theme to the portal which is critical task for me right now. It’s a bummer that we can’t upload a theme into design manager. Having to rely on the local dev cli is a single point of success/failure. Having said that, this is the first time I’ve had an issue with cli but always good to have mutilple options for a task solution.

Thanks,

Terry

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [June 7, 2024, 4:14pm UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759/4 "2024-06-07T16:14:45Z")

</div>

**Quick Update** -

hs auth - still produces the error so new portals can’t be added to the config file

hs upload & hs fetch - still work correctly

**Workaround** - Since hs upload still works, I uploaded the theme to an existing portal then copied the theme to the new portals (custom built theme…not from the marketplace)

When I have time this weekend, I am going to uninstall VS Code and install everything fresh to see if that resolves the error.

Thanks,

Terry

---

<div class="post-metadata">

**Author:** ![AnthonyPerez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anthonyperez/32/35926_2.png) [@AnthonyPerez](https://community.hubspot.com/u/AnthonyPerez)\
**Post date:** [August 15, 2024, 8:21am UTC](https://community.hubspot.com/t/a-typeerror-has-occurred-hs-auth-process/108759/5 "2024-08-15T08:21:34Z")

</div>

Hi Terry,

Are you still facing this issue? I just had the same and it got my gears grinding.

Turns out that the account I was trying to authenticate had no account name, which for me was causing this issue. After setting the account name I could authenticate just fine.

I hope this helps you or anyone else in the future!

Best,

Anthony
