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]: shopify theme dev command not running #1394

Closed
2 tasks done
lockystav opened this issue Feb 16, 2023 · 11 comments
Closed
2 tasks done

[Bug]: shopify theme dev command not running #1394

lockystav opened this issue Feb 16, 2023 · 11 comments
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@lockystav
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When i ran shopify theme dev i expected it to run the development theme onto a local host and a live preview. When i first setup the cli and theme packages through npm, it ran perfectly, then i tried to run it again at a later time and the issue occured and wasnt spinning up the local environment anymore

Actual behavior

It shows an error in the cli and I have no clue why it is happening. I have tried reinstalling the cli and theme npm packages multiple times, reintalled node.js and also ruby but the error is still showing.

Stack trace

╭─ error ─────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                             │
│  command theme:serve:. not found                                                            │
│                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯

C:\Users\locky\AppData\Roaming\npm\node_modules\@shopify\cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
        throw ex;
        ^

AbortSilentError
    at execCLI2 (file:///C:/Users/locky/AppData/Roaming/npm/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/public/node/ruby.js:53:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  tryMessage: null,
  type: 1,
  nextSteps: undefined
}

Reproduction steps

  1. Install Node.js
  2. Install Ruby
  3. Install @shopify/cli and @shopify/theme
  4. Run shopify theme dev

Operating System

Windowws 11

Shopify CLI version (check your project's package.json if you're not sure)

3.43.0

Shell

Command Prompt

Node version (run node -v if you're not sure)

v18.14.0

What language and version are you using in your application?

Its a theme, so liquid and js

@lockystav lockystav added the Type: Bug Something isn't working label Feb 16, 2023
@mailmonir
Copy link

I've the exact same problem and unable to fix it. I uninstalled and reinstalled everything but didn't fix the problem.

@k1m0na
Copy link

k1m0na commented Feb 20, 2023

bump

@isaacroldan isaacroldan added the Area: @shopify/theme @shopify/theme package issues label Feb 21, 2023
@crupko93
Copy link

I got same problem runing yarn start. My package.json is bellow.
{ "name": "shopify-theme-lab", "description": "Customizable modular development environment for blazing-fast Shopify theme creation", "author": "Sergej Samsonenko", "version": "4.4.1", "license": "MIT", "scripts": { "start": "run-p -sr shopify:serve webpack:watch", "deploy": "run-s webpack:build && cd shopify && shopify theme push", "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": "cd shopify && shopify theme dev", "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" }, "dependencies": { "@shopify/cli": "^3.43.0", "vue": "^3.2.26", "vuex": "^4.0.2" }, "devDependencies": { "@babel/core": "^7.16.0", "@babel/plugin-transform-runtime": "^7.16.4", "@babel/preset-env": "^7.16.4", "@vue/compiler-sfc": "^3.2.26", "autoprefixer": "^10.4.0", "babel-loader": "^8.2.3", "clean-webpack-plugin": "^4.0.0", "cross-env": "^7.0.3", "css-loader": "^6.5.1", "css-minimizer-webpack-plugin": "^3.2.0", "eslint": "^8.4.1", "eslint-plugin-vue": "^8.2.0", "eslint-webpack-plugin": "^3.1.1", "mini-css-extract-plugin": "^2.4.5", "npm-run-all": "^4.1.5", "postcss": "^8.4.5", "postcss-html": "^1.3.0", "postcss-import": "^14.0.2", "postcss-loader": "^6.2.1", "sass": "^1.55.0", "sass-loader": "^13.1.0", "stylelint": "^14.1.0", "stylelint-config-recommended": "^6.0.0", "stylelint-webpack-plugin": "^3.1.0", "url-loader": "^4.1.1", "vue-loader": "^16.8.3", "webpack": "^5.65.0", "webpack-cli": "^4.9.1", "webpack-merge": "^5.8.0" } }
image

Interesting fact that replacing:
"shopify:serve": "cd shopify && shopify theme dev", -> "shopify:serve": "cd shopify && shopify help",
will work and display
image

@tomhooker
Copy link

Got same issue

@mailmonir
Copy link

I got a solution for this problem. I uninstalled everything (nodejs, shopify-cli, shopify-theme, ruby), even deleted all the files and folders from appdata->roaming related to these programs. Also deleted npm-cache folder. After that reinstalled everything and now its working fine as before.

@crupko93
Copy link

I got a solution for this problem. I uninstalled everything (nodejs, shopify-cli, shopify-theme, ruby), even deleted all the files and folders from appdata->roaming related to these programs. Also deleted npm-cache folder. After that reinstalled everything and now its working fine as before.

What OS are you using?

@mailmonir
Copy link

I got a solution for this problem. I uninstalled everything (nodejs, shopify-cli, shopify-theme, ruby), even deleted all the files and folders from appdata->roaming related to these programs. Also deleted npm-cache folder. After that reinstalled everything and now its working fine as before.

What OS are you using?

I'm using windows 11 64-bit

@crupko93
Copy link

This answer helped me to solve my issue -> uicrooks/shopify-theme-lab#176 (comment)

@lockystav
Copy link
Author

Just to update everyone,

There was a new update for the shopify CLI and when i installed the update it seemed to be all good again. Seemed like the cli just needed to be refresehd from an update or something. Not too sure

@chunkysteveo
Copy link

Adding the --path and the path to the theme directory helped me get the DEV command to actually fire up and not stall. Hope this gets fixed in an update.

@kamalubd
Copy link

kamalubd commented Dec 6, 2023

Same problem here. stuck after showing "Logged in" message. How to solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants