Webpack-hot-middleware: sockjs-node/info?t=1486292316677 404 Error

Created on 5 Feb 2017  Â·  11Comments  Â·  Source: webpack-contrib/webpack-hot-middleware

hi, i try to run webpack-hot-middleware with dev-middleware + webpack2. i got http://localhost:3000/sockjs-node/info?t=1486292316677 404 (Not Found) error and i couldn't fix through the related issues.
my entry included with "webpack-dev-server/client?http://localhost:3000/" (and also server runs on :3000)

error: ss
my repo: https://github.com/mkg0/webpack2-starter
also for start:

npm i
gulp

any help would be welcome,
thanks

Most helpful comment

I looked through your commit history and found this: https://github.com/mkg0/webpack2-starter/commit/2d2d8ddc892185c42135773c5f88d2c9c9748fa6#diff-11e9f7f953edc64ba14b0cc350ae7b9dL9

So for anyone else googling this your solution might be to swap webpack-dev-server/client?http://localhost:3000/ with webpack-hot-middleware/client?http://localhost:3000/

For me this happens when trying to use the webpack dev middleware instead of running the dev server using the command line.

All 11 comments

sorry it was my mistake, confused dev-server/client with hot-reload/client :)

@mkg0 What was your solution to this?

I looked through your commit history and found this: https://github.com/mkg0/webpack2-starter/commit/2d2d8ddc892185c42135773c5f88d2c9c9748fa6#diff-11e9f7f953edc64ba14b0cc350ae7b9dL9

So for anyone else googling this your solution might be to swap webpack-dev-server/client?http://localhost:3000/ with webpack-hot-middleware/client?http://localhost:3000/

For me this happens when trying to use the webpack dev middleware instead of running the dev server using the command line.

Thanks this helped out

Thank you so much @omarjackman!

@omarjackman You just saved my sanity. Thank you.

Does anyone know how I would make this change if I'm using webpacker? https://github.com/rails/webpacker

Its configuration.js goes through a paths.yml that looks like the below:

default: &default
  config: config/webpack
  entry: packs
  output: public
  manifest: manifest.json
  node_modules: node_modules
  source: app/javascript
  extensions:
    - .js
    - .jsx
    - .ts
    - .sass
    - .scss
    - .css
    - .png
    - .svg
    - .gif
    - .jpeg
    - .jpg

development:
  <<: *default

test:
  <<: *default
  manifest: manifest-test.json

production:
  <<: *default

Hi,
As i am trying to run my application on chrome it is throwing errors as shown below:

error

because of it empty response error is coming for all services.
At the same time my application is working perfectly fine in IE & FireFox.
As i am not able to fix the issues any help would be welcome,
thanks

Getting this with following configuration:
"webpack": "^4.16.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.4"

The same issue to me, I solved my problem by change my code :

var server = new WebpackDevServer(compiler, options)

server.app.listen(port, '0.0.0.0', cb)

to:

var server = new WebpackDevServer(compiler, options)

server.listen(port, '0.0.0.0', cb)

This is because the socket server is created by server.listen not server.app.listen 。

same issue to me, but it disappeared when running the client on localhost port 8080 instead of 8081. server still runs on localhost 3000

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cristy94 picture Cristy94  Â·  3Comments

gartz picture gartz  Â·  9Comments

sarincasm picture sarincasm  Â·  6Comments

benjarwar picture benjarwar  Â·  10Comments

erikakers picture erikakers  Â·  11Comments