--convertFields doesn't work with hs upload CLI command

We are currently in the process of developing a website for our client, and we are utilizing the cool “--convertFields” feature for shared fields. To take advantage of the ES6 syntax, I am using the .mjs format, which has been working well overall. While there are certainly areas for improvement, it has significantly accelerated the development process.

However, I have encountered a particular issue with the “--convertFields” feature when using the “hs upload” CLI command. The problem is that it uploads all files except for the fields.mjs ones, so we are missing our fields across all modules (35+).

Fortunately, there is a workaround for this problem. By using the “hs watch <src> <dest> --convertFields” command and manually saving each .mjs file individually (ctrl+s), then the converted files are getting successfuly uploaded to Hubspot.

I am curious to know if this issue is a known bug or if there is an alternative command that allows for uploading the entire project seamlessly.
It clearly says that we can use hs upload in documentation - https://developers.hubspot.com/docs/cms/building-blocks/modules/write-fields-using-javascript#hs_cos_wrapper_widget_1584980201781_

Thank you.

Hey, @keyword :waving_hand: Thank you very much for taking the time to flag this issue.

Based on my experience, here’s our next steps:

  • Can you please file an issue here? Issues · HubSpot/hubspot-cli · GitHub
  • I’ll flag this to my internal resources and verify this is still our best method to report issues like you are describing

Thank you! — Jaycee

Thanks for your reply!
I have filed this issue here - --convertFields doesn't work with hs upload CLI command · Issue #875 · HubSpot/hubspot-cli · GitHub