Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Compile updates remote preview instead of local #965

Open aschoenbrun opened 5 years ago

aschoenbrun commented 5 years ago

Problem

Hi,

I followed the instructions to set up a dev environment for slate & the starter theme (via NPM). Everything seems to run smoothly, except that the local version (accessed via the link provided in the terminal displayed after compile) is not updated. If I access the theme preview via the Shopify store admin, however, it shows that changes have been applied. This is backward to what I assume should be happening.

I have not yet deployed (published) the site, but why should I if it's not ready?

TIA

Replication steps

I have just started. This is actually a mock site to get the hang of and test the dev environment. All I did was:

I don't know what other steps you could take - it may be a bug in my setup for all I know.

More Information

Terminal compile output:

√  Compiled successfully in 23.273s!

‼  You are about to deploy to the published theme. Continue? Yes

‼  It looks like you are about to upload the settings_data.json file.
   This can reset any theme setting customizations you have done in the
   Theme Editor. To always ignore uploading settings_data.json, add the
   following to your .env file:

      SLATE_IGNORE_FILES=/config/settings_data.json

   Or to disable this prompt, add the following to your slate.config.js file:

      'cli.promptSettings': false

?  Skip uploading settings_data.json? No

↑  Uploading to Shopify...

[default]: 71 / 71 [==========================================] 100 %
13:17:35 [default]Asset Perform Update to sections/footer.liquid at host starter-dev-test.myshopify.com
        Status: 422 Unprocessable Entity
        Errors: New schema is incompatible with the current setting value. Invalid type value for block 'link_list'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block 'text'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block 'newsletter'. Type must be defined in schema

My Error 13:17:35 [default]Asset Perform Update to sections/footer.liquid at host starter-dev-test.myshopify.com
        Status: 422 Unprocessable Entity

√  Files uploaded successfully!

*  You are editing files in theme 45613023316 on the following store:

      https://starter-dev-test.myshopify.com?preview_theme_id=45613023316

   Your theme can be previewed at:

      https://localhost:3000/?preview_theme_id=45613023316 (Local)
      https://192.168.1.8:3000/?preview_theme_id=45613023316 (External)

   Assets are being served from:

      https://localhost:3001 (Local)
      https://192.168.1.8:3001 (External)

   The Browsersync control panel is available at:

      http://localhost:3002 (External)

Watching for changes...
t-kelly commented 5 years ago

Hey @shonybrim -- looks like you're hitting conflicts in your settings_data.json so its not getting uploaded. I would go to the online code editor in admin, go to the config/settongs_data.json file, change the contents to {} and then try yarn start. You should see your workable preview.

Also not that dev is still working with production Shopify servers so it makes sense you would still see it when accessing from Shopify admin. Make sure you've given the local development page a good read.

Hope this helps!