HubSpot / hubspot-cli

A CLI for HubSpot
https://developers.hubspot.com
Other
154 stars 60 forks source link

The module which create by `hs create module` will not be uploaded by error #1224

Open kotto5 opened 2 weeks ago

kotto5 commented 2 weeks ago

Description and Context

npx hs create module module_to_local
npx hs upload module_to_local module_name_to_remote

then

... (Some files will be uploaded)
Uploaded file "/Users/test/Develop/local-dev-tutorial/post_recent.module/fields.json" to "post_recent.module/fields.json"
Uploaded file "/Users/test/Develop/local-dev-tutorial/post_recent.module/module.js" to "post_recent.module/module.js"
Uploaded file "/Users/test/Develop/local-dev-tutorial/post_recent.module/module.html" to "post_recent.module/module.html"
[ERROR] Uploading file "post_recent.module" to "post_recent.module" failed
[ERROR] HubSpotHttpError: The post in account 20616822 was bad. PAGE is not a valid contentType. Must be one of [ANY, LANDING_PAGE, SITE_PAGE, BLOG_POST, BLOG_LISTING, EMAIL, KNOWLEDGE_BASE, QUOTE_TEMPLATE, CUSTOMER_PORTAL, WEB_INTERACTIVE, SMS, SUBSCRIPTION, MEMBERSHIP, CASE_STUDY, CASE_STUDY_LISTING]

This error's reason is setting invalid value for "content_type". The value will be set as "Page", but this value is for previous key ("host_template_type")

I refer this link. I'm new to hubspot (just two days) so maybe I take mistake.

my hs version is 6.2.1

Steps to reproduce

As above.

Expected behavior

As above.

Screenshots

It is not frontend error. It will be occur in terminal so I think screenshots is not needed.

Who to Notify

kotto5 commented 2 weeks ago

I submit PR for this issue!

I am new to Hubspot so welcome to any points and correction! Thanks for this community.