Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Not longer compiling with Shopify CLI 3.0 #176

Open
1 task done
patrickbjohnson opened this issue Feb 22, 2023 · 3 comments
Open
1 task done

[Bug]: Not longer compiling with Shopify CLI 3.0 #176

patrickbjohnson opened this issue Feb 22, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@patrickbjohnson
Copy link

Operating system

Mac OS Monterey

Node.js version

16

Shopify CLI version

3.0

Browsers

Chrome

Version

4 (Current)

Modifications

No response

Details

When updating to Shopify CLI 3.0 the current package scripts to run the Shopify environment do not work from the root directory. It seems as though Shopify requires their scripts to run directly within the shopify directory. So the only workaround possible so to run two different scripts: one for Vue, CSS and JS Compiling and one for Shopify CLI

Someone also posted this issue within the Shopify CLI github repo: Shopify/cli#1394

Notice

  • I read the notice
@patrickbjohnson patrickbjohnson added the bug Something isn't working label Feb 22, 2023
@andyxmas
Copy link

you can supply a --path param to shopify theme dev

https://shopify.dev/docs/themes/tools/cli/commands#dev-flags

@crupko93
Copy link

you can supply a --path param to shopify theme dev

https://shopify.dev/docs/themes/tools/cli/commands#dev-flags

That works for me, thank you for help!

@DasunEdirisinghe
Copy link

DasunEdirisinghe commented Jun 12, 2023

This will fix start and deploy commands. Just replace {your_shopify_theme_directory} with your theme directory. As an exmple, "deploy": "run-s webpack:build && shopify theme push --path C:\Users\DLAD\Desktop\dlad-shopify-2.2.1\shopify",

also, you can modify the rest of the commands for CLI3.0 in the same manner.

"scripts": {
    "start": "run-p -sr shopify:serve webpack:watch",
    "deploy": "run-s webpack:build && shopify theme push --path {your_shopify_theme_directory}",
    "deploy:new": "run-s webpack:build && cd shopify && shopify theme push --unpublished",
    "webpack:watch": "cross-env NODE_ENV=development BROWSERSLIST_ENV=development BROWSERSLIST_CONFIG=.config/.browserslistrc webpack --config .config/webpack/webpack.dev.js --watch --progress",
    "webpack:build": "cross-env NODE_ENV=production BROWSERSLIST_ENV=production BROWSERSLIST_CONFIG=.config/.browserslistrc webpack --config .config/webpack/webpack.prod.js --progress",
    "shopify:serve": "shopify theme dev --path {your_shopify_theme_directory}",
    "shopify:pull": "cd shopify && shopify theme pull",
    "lint": "run-s -c lint:*",
    "lint:js": "eslint src/**/*.{js,vue} --config .config/.eslintrc.js",
    "lint:css": "stylelint src/**/*.{vue,css,sass,scss} --config .config/.stylelintrc.js",
    "lint:shopify": "cd shopify && shopify theme check",
    "fix": "run-s -c fix:*",
    "fix:js": "eslint src/**/*.{js,vue} --config .config/.eslintrc.js --fix",
    "fix:css": "stylelint src/**/*.{vue,css,sass,scss} --config .config/.stylelintrc.js --fix",
    "fix:shopify": "cd shopify && shopify theme check -a"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants