-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shopify CLI frontend build (node-template) #1186
Comments
Hi @mtahirofficial ! Try to install the cross-env library, and after that:
I believe you need this: https://www.npmjs.com/package/cross-env |
Hi, @fonya2014 Thanks for your reply. Can you please specify where to install cross-env? I install in /web/frontend but its not working. |
I don't remember for sure, as I can see it installed for root and /web for my project |
I have installed it in all three places in the root, in /web, and in /web/frontend but it's not working. It says |
try to install it globally |
@mtahirofficial I noticed that you on windows. The instructions we put there are for linux/MAC. That is a problem we should fix. Also, we should really adjust our frontend to use I don't have a windows machine with me to test but here is what I would recommend to try: Hopefully this should help you. |
To avoid using cross-env for building (unnecessary), the following are the correct Windows commands: cd web\frontend
set SHOPIFY_API_KEY=REPLACE_ME
npm run build #1250 created to track addition of Windows commands to readme file. |
Issue summary
I am trying to build the front end of the application developed using Shopify-CLI. I am trying to add
SHOPIFY_API_KEY
as explained here.I am trying this command
cd web/frontend/ && SHOPIFY_API_KEY=REPLACE_ME npm run build
from the root directory of my project. But,SHOPIFY_API_KEY
is not added through this commandExpected behavior
As described here the
SHOPIFY_API_KEY
should be added to the build.Actual behavior
When I run the command it's giving me an error described below and attached a screenshot of the error message.
Please, anyone, help me with this problem. I will be grateful.
The text was updated successfully, but these errors were encountered: