laravel-mix: "Cannot GET /js/app.js" in HMR Mode
- Laravel Mix Version: 2.0.0
- Node Version (
node -v): 8.9.4 - NPM Version (
npm -v): 5.6.0 - Laravel Version: 5.6.3
- OS: Windows 10
Description:
When I access http://localhost:8080/js/app.js in HMR mode (npm run hot), the server returns 404 with message: “Cannot GET /js/app.js”.
Steps To Reproduce:
- Create new laravel project by using
laravel new <project_name>command - Run
npm install - Delete public/js/app.js to avoid confusion. Assets are served from memory
- With browser, go to http://localhost:8080/js/app.js
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 19
This is the workaround, inspired from #1437 :
Put this into webpack.mix.js.
I’m using laravel’s react scaffolding and this doesn’t fix the issue for me
@nkrh
I think this doesn’t fix hot-reloading of css though.
Stil broken in the latest stable laravel/laravel release; when will a fix (this fix?) ship?
The proposed fix works but this is a workaround. All users using windows have this problem i’m still waiting for an official fix. There are many issues regarding this since v2.0.0
@JeffreyWay do you plan to apply some of the proposed solutions or we should use them this way ?