Roots Discourse

Css not injected in yarn start

I use bedrock and sage for a few dozen websites. Suddenly 2 of them (newly created projects) won’t inject the css upon yarn start. HTML is loaded and displayed, styles aren’t.

Building with yarn works as it should (yarn build and yarn build production).

I tried a number of things, most obviously checking all parameters in config.json but they all are correct.

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

Hi Jan-Klass

Are you try remove .cache-loader folder, next yarn build ?

Hi Jacek

Thanks for the suggestion. Didn’t help though. One of the two projects has automagically been fixed after a reboot, the other still doesn’t work as described above, also after removing the .cache-loader directory.

In my console I have always missing css on localhost:3000 but styles working. On yarn build this error gone from console. Your case is different because your style not loading and your config looks ok