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

livereload.js don't work #44

Open
Steve3029 opened this issue Apr 2, 2018 · 11 comments
Open

livereload.js don't work #44

Steve3029 opened this issue Apr 2, 2018 · 11 comments

Comments

@Steve3029
Copy link

My webpack config:
plugins: [ new LiveReloadPlugin({port: 3001}) ]

In html page:
<script src="http://localhost:3001/livereload.js"></script>

I have got the following error on Chrome:
"GET http://localhost:3001/livereload.js net::ERR_CONNECTION_REFUSED"

@statianzo
Copy link
Owner

Does your webpack log output Live reload listening on port 3001?

@Steve3029
Copy link
Author

No, I haven't got any log showing live reload listening on port 3001.

@statianzo
Copy link
Owner

If there's no logging, then the plugin server isn't starting. Are you running webpack in watch mode?

What version of webpack are you using? What version of webpack-livereload-plugin? Can you share an entire webpack config that reproduces this issue?

@Steve3029
Copy link
Author

@statianzo I used webpack-livereload-plugin v2.1.1 and webpack 4. And the issue has been fixed when I went back to webpack v3.11.0 and webpack-livereload-plugin v1.0.0.

@statianzo
Copy link
Owner

Thanks for the report @Steve3029. I'm reopening this as a reminder to look at v2.1.1 with webpack 4.

@statianzo statianzo reopened this Apr 3, 2018
@codabrink
Copy link

Any progress on this?

@amiceli
Copy link

amiceli commented Oct 22, 2018

Currently with version 2.1.1 and webpack 4.19.1 it works for me.

@codabrink
Copy link

codabrink commented Oct 30, 2018

Yeah, it seems to have arbitrarily started working again with the latest webpack.
Classic Javascript.

@rachelbriggs
Copy link

Same error using webpack 4.29.1 and plugin version 2.2.0

@Ragnoroct
Copy link

Ragnoroct commented Jun 9, 2019

Dumb mistake on my part was running webpack on docker without opening the port for the webpack-livereload-plugin server.

Forwarding that port fixed the ERR_CONNECTION_REFUSED

@crisamdegracia
Copy link

crisamdegracia commented Apr 19, 2021

Took me many days to make webpack-dev-server work in WordPress coz it needs the HTML file, but I can't.
Finally this plugin works!

For some reason, you need to refresh the browser 1st, just one refresh then the live reload will kick in the next time you change the file.

"webpack-livereload-plugin": "^3.0.1",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0",  

new LiveReloadPlugin({ protocol: "http", hostname : "understraptest.local", appendScriptTag: true, })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants