Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack error — sockjs-node connection refused

I get this error when I upload my site to my webserver:

http://desktop-gq7oerj:3000/sockjs-node/info?t=1489850537555 net::ERR_CONNECTION_REFUSED

enter image description here

my webpack config is:

 entry: [
    'webpack-dev-server/client?http://' + require("os").hostname() + ':3000/',
    'webpack/hot/only-dev-server',
    './src/index'
],

How can I fix it?

like image 713
Bomber Avatar asked Mar 18 '17 15:03

Bomber


1 Answers

In my case,it worked this => Here's a link

in webpack.config i aggregated :

devServer: {
      socket: 'socket',
      ...
    },
like image 134
ricnef2121 Avatar answered Nov 14 '22 08:11

ricnef2121