How to migrate shopify theme app extension from cli 2.0 to cli 3.0?
Solution:
To classify a directory as an extension, given directory must include a config file with a .toml extension. Quote from documentation (https://shopify.dev/apps/tools/cli/migrate#theme-app-extensions):
If you're migrating a theme app extension, then do the following:
Create a shopify.theme.extension.toml in the extension’s directory.
The TOML should contain the following information:
name: The name of your app extension. name should match the EXTENSION_TITLE from your extension's .env file.
type: Enter theme.
shopify.theme.extension.toml :
name = "My theme extension" type = "theme"
Optional: delete any remaining .env, extension.config.yml, and .shopify-cli.yml files.
Answer
Solution:
I found it. Follow below steps:
Create
package.json
file at root of your project directory and copy content from shopify doc (https://shopify.dev/apps/tools/cli/migrate) and pastenpm install
npm run shopify app generate extension
npm run deploy
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.