# Can't upload fields.json via CLI

**URL:** <https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385>\
**Category:** CMS Development\
**Tags:** design-manager\
**Created:** [April 9, 2024, 3:29am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385 "2024-04-09T03:29:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacobosque](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pacobosque](https://community.hubspot.com/u/pacobosque)\
**Post date:** [April 9, 2024, 3:29am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/1 "2024-04-09T03:29:43Z")

</div>

I’m trying to copy the fields from a module in one account to another account where I want to make the same module. First I use the “Copy JSON” to copy the entire fields.json from the account with the existing module. Then using the CLI in VS Code I use the “hs upload” command to upload the fields.json to the new module in the other account. Each time I look at the module in the Design Manager though the fields continue to be empty. I do see the success message in the CLI: “[SUCCESS] Uploaded file from x to y in the Design Manager of account z”. Every other CLI command I am running works just fine, eg. hs list, hs fetch, etc. What do I need to do to get that fields.json imported and active in the module in the other account?

---

<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:** [April 10, 2024, 6:42am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/2 "2024-04-10T06:42:02Z")

</div>

Hi @pacobosque,  
Thank you for asking the Community!  
Can you share the section of your JSON body that is giving the error, please?  
The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.

I’d like to invite a couple of subject matter experts and some Community Members to this conversation: Hi @sst, @DStaniszewski, @Kevin-C, @FMontenegro, [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259), @andireuter @LFilip and @gabriel-nextiny do you have suggestions to help @pacobosque, please?  
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 🙂  
Thank you so much and have a great day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![pacobosque](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pacobosque](https://community.hubspot.com/u/pacobosque)\
**Post date:** [April 11, 2024, 12:37am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/3 "2024-04-11T00:37:21Z")

</div>

The fields.json file is generated by Hubspot so I was thinking it’s going to be valid and it is when I run it through [https://jsonlint.com/](https://jsonlint.com/). Then I also pasted into the Hubspot browser editor and it says “no errors found”. Open to other ideas.

---

<div class="post-metadata">

**Author:** ![pacobosque](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pacobosque](https://community.hubspot.com/u/pacobosque)\
**Post date:** [April 10, 2024, 5:33pm UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/4 "2024-04-10T17:33:00Z")

</div>

Here’s a little more info. The account where the fields.json is copied from has CMS Hub Professional while the account I am trying to upload it to is CMS Hub Starter. I don’t know if that matters. Also the fields.json is created by Hubspot and I am not changing it at all. It’s a very large file. Lastly despite the fields.json upload success message, the whole fields panel remains empty as you can see in this screenshot:

 ![fields-module.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/e/2e47e3c2caaf78fe4431e575100324999e6dfc87.jpeg)

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [April 10, 2024, 9:25pm UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/5 "2024-04-10T21:25:19Z")

</div>

Hi @pacobosque

My guess (and I mean guess) would be invalid json that’s not being published.

I would try validating you json and trying again.

And/or manually pasting the json into the editor in the browser (which will also highlight any potential issues).

Have fun

Mike

p.s. thank you for the mention [@BérangèreL](https://community.hubspot.com/t5/user/viewprofilepage/user-id/230185)

Here to learn more about HubSpot and share my HubSpot Knowledge. I’m the founder of [Webalite](https://www.webalite.com?utm_campaign=community-forum&utm_source=community&utm_content=signature) a Gold HubSpot Partner Agency based in Wellington, New Zealand and the founder of **Portal-iQ** the world’s first automated [HubSpot Portal Audit](https://portal-iq.com?utm_campaign=community-forum&utm_source=community-forum&utm_content=signature) that helps you work smarter with HubSpot.

---

<div class="post-metadata">

**Author:** ![pacobosque](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pacobosque](https://community.hubspot.com/u/pacobosque)\
**Post date:** [April 13, 2024, 5:11am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/6 "2024-04-13T05:11:09Z")

</div>

I figured out the problem. Even though the CLI gave me a success message when I ran hs upload, there was an issue with my path.

At first I was trying the command like this:

hs upload “C:\Users\example\module-name.module\fields.json” “theme child/modules/module-name.module”

I’d get a success message but the original fields.json was still reflected in the Fields UI in the right column. So I’m not sure what I was succeeding at but it was not uploading and replacing the fields.json.

The problem was that in order for it to overwrite the existing fields.json, I needed to include fields.json at the end of destination path like this:

hs upload “C:\Users\example\module-name.module\fields.json” “theme child/modules/module-name.module/fields.json”

That worked finally!

---

<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:** [May 21, 2024, 11:49am UTC](https://community.hubspot.com/t/cant-upload-fields-json-via-cli/104385/7 "2024-05-21T11:49:12Z")

</div>

Hi @pacobosque, I hope that you are well!  
Thanks a lot for sharing the solution with the Community! And thanks so much [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) for your help!

This will be really helpful to other Community Members who experience the same!  
Have a lovely day!  
Best,  
Bérangère
