Yarn start fail

Hi,

I have installed Sage via composer, following the documentation. Then I have Installed the latest Yarn version and downloaded all the dependencies via “yarn” command.

When I run “yarn start” I got the following:

$ webpack --hide-modules --watch --config resources/assets/build/webpack.config.js

Webpack is watching the files…

Error: No files matching the pattern “D:\xampp\htdocs\sage\wp-content\themes\sage-theme\resources\assets***.s?(c|a)ss” were found.
at globby.then (D:\xampp\htdocs\sage\wp-content\themes\sage-theme\node_modules\stylelint\lib\standalone.js:212:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.

All the files are in the original Sage installation location, so they are present.

I’m on Windows 10
Node 10.23.0

Any help?
Thank you,
G.

1 Like

I have the exact same problem while workin on windows (although I am running the command through Flywheels Local ssh).

I just copied/pasted all my node_modules from an existing project to my new project and this worked. So it looks like some dependency is updated.

Can you post the package.json that contains the working dependencies?
Thank you.

Most certainly:

{
  "name": "sage",
  "version": "9.0.5",
  "author": "Roots <team@roots.io>",
  "homepage": "https://roots.io/sage/",
  "private": true,
  "repository": {
    "type": "git",
    "url": "git://github.com/roots/sage.git"
  },
  "bugs": {
    "url": "https://github.com/roots/sage/issues"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "http://opensource.org/licenses/MIT"
    }
  ],
  "browserslist": [
    "last 2 versions",
    "android 4",
    "opera 12"
  ],
  "stylelint": {
    "extends": "stylelint-config-standard",
    "rules": {
      "no-empty-source": null,
      "at-rule-no-unknown": [
        true,
        {
          "ignoreAtRules": [
            "extend",
            "at-root",
            "debug",
            "warn",
            "error",
            "if",
            "else",
            "for",
            "each",
            "while",
            "mixin",
            "include",
            "content",
            "return",
            "function"
          ]
        }
      ]
    }
  },
  "scripts": {
    "build": "webpack --progress --config resources/assets/build/webpack.config.js",
    "build:production": "webpack --env.production --progress --config resources/assets/build/webpack.config.js",
    "build:profile": "webpack --progress --profile --json --config resources/assets/build/webpack.config.js",
    "start": "webpack --hide-modules --watch --config resources/assets/build/webpack.config.js",
    "rmdist": "rimraf dist",
    "lint": "npm run -s lint:scripts && npm run -s lint:styles",
    "lint:scripts": "eslint resources/assets/scripts resources/assets/build",
    "lint:styles": "stylelint \"resources/assets/styles/**/*.{css,sass,scss,sss,less}\"",
    "test": "npm run -s lint",
    "pot": "mkdir -p ./resources/lang && find ./resources ./app -iname '*.php' | xargs xgettext --add-comments=TRANSLATORS --force-po --from-code=UTF-8 --default-domain=de_DE -k__ -k_e -k_n:1,2 -k_x:1,2c -k_ex:1,2c -k_nx:4c,12 -kesc_attr__ -kesc_attr_e -kesc_attr_x:1,2c -kesc_html__ -kesc_html_e -kesc_html_x:1,2c -k_n_noop:1,2 -k_nx_noop:3c,1,2, -k__ngettext_noop:1,2 -o resources/lang/sage.pot && find ./resources -iname '*.blade.php' | xargs xgettext --language=Python --add-comments=TRANSLATORS --force-po --from-code=UTF-8 --default-domain=de_DE -k__ -k_e -k_n:1,2 -k_x:1,2c -k_ex:1,2c -k_nx:4c,12 -kesc_attr__ -kesc_attr_e -kesc_attr_x:1,2c -kesc_html__ -kesc_html_e -kesc_html_x:1,2c -k_n_noop:1,2 -k_nx_noop:3c,1,2, -k__ngettext_noop:1,2 -j -o resources/lang/sage.pot"
  },
  "engines": {
    "node": ">= 6.9.4"
  },
  "devDependencies": {
    "autoprefixer": "~8.2.0",
    "browser-sync": "~2.24.6",
    "browsersync-webpack-plugin": "^0.6.0",
    "bs-html-injector": "~3.0",
    "buble-loader": "^0.4.1",
    "cache-loader": "~1.2.0",
    "clean-webpack-plugin": "^0.1.18",
    "copy-globs-webpack-plugin": "^0.2.0",
    "css-loader": "^0.28.9",
    "cssnano": "~4.0.5",
    "eslint": "~4.19.1",
    "eslint-loader": "~1.9",
    "eslint-plugin-import": "~2.14.0",
    "extract-text-webpack-plugin": "~3.0.2",
    "file-loader": "^1.1.6",
    "friendly-errors-webpack-plugin": "^1.6.1",
    "imagemin-mozjpeg": "~7.0.0",
    "imagemin-webpack-plugin": "~2.2.0",
    "import-glob": "~1.5",
    "node-sass": "~4.9.3",
    "postcss-loader": "~2.1.0",
    "postcss-safe-parser": "~3.0",
    "resolve-url-loader": "~2.3.0",
    "rimraf": "~2.6",
    "sass-loader": "~6.0",
    "style-loader": "^0.22.1",
    "stylelint": "^8.4.0",
    "stylelint-config-standard": "~18.2.0",
    "stylelint-webpack-plugin": "^0.10.5",
    "uglifyjs-webpack-plugin": "^1.3.0",
    "url-loader": "^0.6.2",
    "webpack": "~3.10.0",
    "webpack-assets-manifest": "^1.0.0",
    "webpack-dev-middleware": "~2.0.4",
    "webpack-hot-middleware": "~2.22.3",
    "webpack-merge": "~4.1.4",
    "yargs": "~11.0.0"
  },
  "dependencies": {
    "@fancyapps/fancybox": "^3.5.7",
    "@fortawesome/fontawesome-svg-core": "^1.2.6",
    "@fortawesome/free-brands-svg-icons": "^5.4.1",
    "@fortawesome/free-regular-svg-icons": "^5.4.1",
    "@fortawesome/free-solid-svg-icons": "^5.4.1",
    "bootstrap": "v4.1.3",
    "flickity": "^2.2.0",
    "jquery": "^3.3.1",
    "leaflet": "^1.4.0",
    "pattern.css": "^1.0.0",
    "popper.js": "^1.14.4"
  }
}
1 Like

Hi Leon,

I managed to let it work by commenting the following lines in the webpack.config.js

/*new StyleLintPlugin({
failOnError: !config.enabled.watcher,
syntax: ‘scss’,
}),
*/

3 Likes

Newbie here. This solution worked for me.

1 Like

thanks, it worked for me!!