question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS file not being served (Not Found, 404) in HMR

See original GitHub issue
  • Laravel Mix Version: 0.12
  • Node Version (node -v): v7.6.0
  • NPM Version (npm -v): 4.1.2
  • OS: Ubuntu Mate 16.04

Description:

It’s weird that when running npm run hot, my css files cannot be found… Cannot GET /dist/all.css. The path is changed to http://localhost:8080/dist/all.css but it is not found. Anyone knows the solution for this? Im not sure if this related to #766. All javascript files is served well, except for my css file. It is fine if I run npm run dev.

Possible related: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/30#issuecomment-125757853

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nickknissencommented, Jun 6, 2017

Does http://localhost:8080/public/dist/all.css work? I am running into the same problem. A solution was to add contentBase: "./public" to webpack.config.js:331

0reactions
stale[bot]commented, Dec 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS file not being served (Not Found, 404) in HMR · Issue #830
It's weird that when running npm run hot , my css files cannot be found.. Cannot GET /dist/all.css . The path is changed...
Read more >
404 error when attempting to load stylesheets - Stack Overflow
This means that the CSS file, because it isn't in a directory that is the root or under the root, does not have...
Read more >
Bud Dev __hmr 404 - Roots Discourse
I'm attempting to use Bud to compile assets for a Drupal 9 theme. Everything is working properly to compile my JS and SCSS...
Read more >
Hot Module Replacement - webpack
Hot Module Replacement (or HMR) is one of the most useful features offered by webpack. It allows all kinds of modules to be...
Read more >
Laravel Vite Issue - Laracasts
vite v2.9.13 dev server running at: Local: http://localhost:5173/ Network: ... but my css was not being passed through tailiwind before being served.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found