uicrooks / shopify-theme-lab

Shopify theme development environment using Liquid, Vue and Tailwind CSS. Built on top of Shopify CLI ๐Ÿงช
https://uicrooks.github.io/shopify-theme-lab-docs/
MIT License
737 stars 130 forks source link

v2.2.4 #19

Closed josechirivella closed 3 years ago

josechirivella commented 3 years ago

Hello!

Encounter an issue while running the npm start command. It took me a while until I found a typo in one of the task commands that should be cross-env instead of cross-var

sergejcodes commented 3 years ago

Hi @JoseChirivella14 ๐Ÿ‘‹๐Ÿป,

this wasn't a typo but was intended to solve cross-platform issues between Windows, Mac OS and Linux with the cross-var-no-babel npm package.

While your solution works on Mac OS. It breaks the remote reloading feature on Windows.

I think the proper solution is to use cross-env-shell (Just tested on Windows and Mac OS) instead of cross-var / cross-env. cross-env-shell is included in cross-env package cross-env vs cross-env-shell

  ...
  "shopify:watch": "cross-env-shell shopify-themekit watch --env=dev --allow-live --config .config/shopify/shopify.dev.yml --notify=http://localhost:$npm_package_config_reloadr_serverPort/reload",
  ...

Can you confirm if this works for you? And if it does, update your pull request?

  1. replace cross-env with cross-env-shell for shopify:watch task
  2. run npm uninstall cross-var-no-babel. This package is not required anymore, since cross-env-shell fixes the cross-platform issue
  3. bump the version inside package.json to 2.2.4
  4. run npm install
  5. commit package.json and updated package-lock.json
  6. add a brief comment: what problem does your pull request solve?
josechirivella commented 3 years ago

Solves an issue when running the command npm start and the command shopify:watch was failing due to a problem with the package cross-var