Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

JS/TS unavailable for the product_discounts (Product Discounts API) function extension type

JS/TS unavailable for the product_discounts (Product Discounts API) function extension type

yojisekiya
Shopify Partner
5 0 3
JavaScript and TypeScript are supposed be available here according to this workshop, but apparently not here, any idea why?
Replies 3 (3)

Nick_Wesselman
Shopify Staff
171 43 71

Hi @yojisekiya --

Be sure you are on the latest version of the CLI, and that you have exported the following environment variable.

 

export SHOPIFY_CLI_FUNCTIONS_JAVASCRIPT=1

 

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

yojisekiya
Shopify Partner
5 0 3

Thank you @Nick_Wesselman for your feedback!

 

I exported the environmental variable and updated the CLI to the latest version, but it didn't resolve this.

 

Anything else you might think of that might be causing this?

Nick_Wesselman
Shopify Staff
171 43 71

Hi @yojisekiya -- Not sure, but that workshop is irrelevant now that we have released a deployable dev preview of JS and TS. You can read more here and try one of the tutorials that supports JS:

https://shopify.dev/docs/api/release-notes/developer-previews#javascript-support-for-shopify-functio...

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog