Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run hot not working #2057

Closed
zaitebaki opened this issue Apr 4, 2019 · 3 comments
Closed

npm run hot not working #2057

zaitebaki opened this issue Apr 4, 2019 · 3 comments
Labels

Comments

@zaitebaki
Copy link

zaitebaki commented Apr 4, 2019

I installed the latest version of Laravel (now 5.8) and enter two commands:

npm install
npm run hot

and get page-error on http://localhost:8080 -

Cannot GET /.

I get this error in all my laravel-projects, when I use npm run hot. Other commands such as npm run development, npm run watch work as needed.
My OS - Windows 7.

Help;-)

 

@michaelroper
Copy link

@footballman17 if you try http://localhost:8080/mix-manifest.json, that should work.
There is no default index page being server from the webpack dev server, which is why you'd get that error.

@rbrisita
Copy link

Add this to a webpack.mix.js file:

let mix = require('laravel-mix');

mix.webpackConfig({
    devServer: {
        proxy: {
            '*': 'http://localhost:8000'
        }
    }
});

Run the backend server (php artisan serve) and then npm run hot. This will proxy all frontend requests to the backend so files can be processed correctly. More information here.

With that said, npm run hot should work without developer modification.

@stale
Copy link

stale bot commented Jul 29, 2019

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.

@stale stale bot added the stale label Jul 29, 2019
@stale stale bot closed this as completed Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants