Installation
Once you have Shopify CLI successfully installed, the next step is to create the local project.
1. Clone the project repository
git clone [email protected]:studioforty9/REPOSITORY-NAME.git .
Each Shopify project will have a unique repository on GitHub. (Note: while most projects will have been migrated to GitHub some may still be in BitBucket).
In your terminal run: git clone [email protected]:studioforty9/REPOSITORY-NAME.git .
You will be asked for a password. Enter the password associated with the SSH key linked to your GitHub user account.
2. Log in to Shopify
Shopify CLI requires that you log in to the store that you will be working on.
shopify logout && shopify login --store <store-name>
where <store-name> is of the form: store-name.myshopify.com
I. Development stores
When prompted sign in using [email protected].
For development stores created under the StudioForty9 Shopify Partner account, you will need to sign in using the above staff account. The password can be found in the StudioForty9 1Password account.
Signing in with an account linked to the StudioForty9 Partner account will not work. If logged in using a Partner account Shopify CLI will return an error when trying to serve the current theme: ‘You are not authorized to edit themes on store-name’
Use shopify whoami to verify what account you are currently signed in with.
II. Customer stores
When prompted sign in using your StudioForty9 Partner account.
For published customer stores, that is stores no longer marked as Development for whom StudioForty9 has collaborator access, your StudioForty9 Partner account team login will work. A staff account is not required for these stores. This generally applies to SLA tasks.
IMPORTANT
Do NOT attempt to login to partners.shopify.com using a staff account, i.e. [email protected].
This email is not linked to the StudioForty9 partner account and it will not let you in.
It will attempt to create a new partner account and will break any staff accounts linked to this email.
3. Install packages
In your local terminal and in the project folder run: npm ci
4. Start the development tools
In your terminal in the root folder of your project, run: npm run dev
This will build up-to-date distribution files for your store’s theme, run Tailwind to generate an up-to-date theme stylesheet, and start Shopify CLI’s theme server.
Shopify CLI will print a local and remote preview URL as well as a link to access the theme customiser.
Troubleshooting
* rollup: not found
Occasionally during NPM installation or the first call to npm run dev an error may be returned stating that a rollup dependency can not be found.
If this happens run the following commands: npm install rollup followed by npm ci
* Shopify serve is connecting to the wrong store
Run shopify switch and select the correct store from the list displayed
Or, run shopify switch --store <DOMAIN> to skip the list
* ‘You are not authorized to edit themes on '
You are signed in to Shopify with an account that has no access to the requested store.
First, check the store name given in the error and ensure this is correct. If not see Shopify serve is connecting to the wrong store.
You can run shopify whoami to verify the account you are currently signed in with.
Change to a new account by running: shopify logout followed by shopify login --store <DOMAIN> and providing your password when prompted.
For development stores sign in using the ‘[email protected]’ email and password (stored in 1Password)
For client stores use your StudioForty9 team account details.