Yarn start fails because of error: no configuration for main.scss

I get this error when I try to run yarn start on a project with sage+badrock+tailwindcss:

     yarn start
yarn run v1.17.3
$ webpack --hide-modules --watch --config resources/assets/build/webpack.config.js

Webpack is watching the files…

Error: No configuration provided for C:\Users\..\app\bedrock\web\app\themes\theme-name\resources\assets\styles\main.scss
    at module.exports (C:\Users\..\app\bedrock\web\app\themes\theme-name\node_modules\stylelint\lib\utils\configurationError.js:8:28)
    at stylelint._fullExplorer.load.then.then.config (C:\Users\..\app\bedrock\web\app\themes\theme-name\node_modules\stylelint\lib\getConfigForFile.js:46:15)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I can find a solution to this problem. Before that, an allert message pop up when I run yarn:

    yarn install v1.17.3
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > stylelint-webpack-plugin@0.10.5" has incorrect peer dependency "webpack@^1.13.2 || ^2.7.0 || ^3.11.0 || ^4.4.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 25.57s.

Can anyone help with this?



Could you post the contents of theme-name/resources/assets/config.json

Hi Jordan,
that’s it (I’m working inside Local by Flywheel)

  "entry": {
    "main": ["./scripts/main.js", "./styles/main.scss"],
    "customizer": ["./scripts/customizer.js"]
  "publicPath": "/app/themes/theme-name",
  "devUrl": "https://my-site.local",
  "proxyUrl": "https://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": ["app/**/*.php", "config/**/*.php", "resources/views/**/*.php"]

Thanks for your help!

Is your publicPath actually theme-name or are you changing the theme name before adding it here on the forum, checking it’s actually set?

I’m changing it cause we used the name of the company.

We solved it by recreating everything. Still don’t know the reason of this problem; anyway stylelint keeps creating warnings.

This topic was automatically closed after 42 days. New replies are no longer allowed.