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.

Unable to read .env file

Unable to read .env file

HarikrishnaIam
Shopify Partner
1 0 0

Hello,

I am a Shopify developer currently working on a Shopify theme app extension using this library. Unfortunately, I am encountering an issue where I cannot read the .env file in App.jsx (located in frontend/components/App.jsx). Despite using process.env.KEY, it consistently returns undefined. Could you please assist me in resolving this issue and guide me on how to read the .env file properly?

Thank you for your help.

Reply 1 (1)

Liam
Community Manager
3108 342 884

Hi HarikrishnaIam,

 

It's possible this issue is related to the library you're using, I'd recommend opening an issue in the library's repo here: https://github.com/iskurbanov/theme-app-extension-react/issues

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog