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

Format Script fails #881

Closed james-prado closed 5 years ago

james-prado commented 5 years ago

Problem

In a fresh project on v1.0.0-beta.13 npm run format fails

error:

> slate-tools format

/bin/sh: 1: /home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/node_modules/.bin/eslint: not found

ESLint errors found.

/bin/sh: 1: /home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/node_modules/.bin/stylelint: not found
child_process.js:644
    throw err;
    ^

Error: Command failed: "/home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/node_modules/.bin/stylelint" "./**/*.{css,scss,sass}" --config /home/jamesprado/Github/demo-theme/.stylelintrc --fix --ignore-path /home/jamesprado/Github/demo-theme/.stylelintignore
    at checkExecSyncError (child_process.js:601:13)
    at execSync (child_process.js:641:13)
    at stylelint (/home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/tools/stylelint/index.js:16:3)
    at runStylelintFix (/home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/tools/stylelint/index.js:34:3)
    at Object.<anonymous> (/home/jamesprado/Github/demo-theme/node_modules/@shopify/slate-tools/cli/commands/format.js:18:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Replication steps

  1. Create new project from v1.0.0-beta.13
  2. Add ssl cert
  3. npm run format

Platform

Ubuntu 18.04

Edit: also fails on MacOS Mojave

t-kelly commented 5 years ago

Having trouble reproducing this one. @huguestennier could you give it try?

huguestennier commented 5 years ago

@james-prado What command did you use to create your slate project? Did you use Starter Theme?

If you used a custom theme, it looks like it's missing an .eslintrc file.

james-prado commented 5 years ago

I ran npx create-slate-theme demo-theme just like it says in the docs and I used the starter theme.

james-prado commented 5 years ago

I can't seem to reproduce it anymore. Not sure what changed.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.