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

Browser-sync not working on Slate V0 #924

Open willwongco opened 5 years ago

willwongco commented 5 years ago

Problem

Everything works fine except it's not reloading the browser. It was working fine on another machine, but I'm seeing the same issue if I do a fresh "npm install"

More Information

Tried it on node v11.4.0 and also tried downgrading node to v8.11.1 with @shopify/slate-tools v0.3.3 & v0.14.0.

ConduciveMammal commented 5 years ago

@NathanPJF Could this be addressed please? I know V1 is all the rage right now but V0 still has a very valid place in daily workflows, at least until/if V1 will be able to migrate older themes.

hcmlopes commented 5 years ago

I would like to see this get some TLC as well. I have projects that are based on Slate V0.14 and browser reload stopped working at some point and I have not been able to fix it.

To be clear this doesn't work for me with any version of slate. Not even when creating a brand new project with v1.15

The error I see in my console is VM19:1 GET https://192.168.86.246:3002/browser-sync/socket.io/?EIO=3&transport=polling&t=Malzi13 net::ERR_CERT_COMMON_NAME_INVALID

and I think the problem has to be with the certificate on localhost. Any help would be appreciated

jonathanmoore commented 5 years ago

I'm still running both Slate v0 on some older projects and Slate v1 on newer ones. Switching back to v0 I do have to downgrade to node 6.11.5. It's possible that it works with a slightly newer version, but I do know that I haven't been able to get it to work with node 8+

hcmlopes commented 5 years ago

I'm still running both Slate v0 on some older projects and Slate v1 on newer ones. Switching back to v0 I do have to downgrade to node 6.11.5. It's possible that it works with a slightly newer version, but I do know that I haven't been able to get it to work with node 8+

@jonathanmoore Thanks for this info. I will try and verify this

hcmlopes commented 5 years ago

@jonathanmoore unfortunately removing my current node and replacing it with v6.11.5 did not help my reloading issues. I still think the problem has to do with certificates but don't understand enough to figure this out...

Quite frustrating

snowiesuet commented 4 years ago

Does anyone have any updates on this?

oceanep commented 4 years ago

I would like to see this get some TLC as well. I have projects that are based on Slate V0.14 and browser reload stopped working at some point and I have not been able to fix it.

To be clear this doesn't work for me with any version of slate. Not even when creating a brand new project with v1.15

The error I see in my console is VM19:1 GET https://192.168.86.246:3002/browser-sync/socket.io/?EIO=3&transport=polling&t=Malzi13 net::ERR_CERT_COMMON_NAME_INVALID

and I think the problem has to be with the certificate on localhost. Any help would be appreciated

https://shopify.github.io/slate/docs/create-a-self-signed-ssl-certificate

Hot reload won't work because the browser is blocking the request, use mkcert to create a self signed certificate (as it says above) and also make sure to run mkcert's comman for adding that to the osx keychain (it doesn't say how above but mkcert will throw a warning with the appropriate command to run after.)