localhost not working
ipa-swk opened this issue · 2 comments
ipa-swk commented
When I run x0 with the docs folder, the local server starts,
C:\Users\SWK\Desktop\x0>x0 docs
x0 @compositor/x0
x0 dev server listening on http://localhost:8080 (copied to clipboard)
but I can't see anything in the browser and it says:
Waiting for localhost..
After a while it says:
This page isn’t working localhost didn’t send any data.
ERR_EMPTY_RESPONSE
When I press Ctr-C
there are some errors, I am not sure if they are related with this issue..
TypeError: res.getHeader is not a function
at processRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:82:18)
at ready (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:51:12)
at handleRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:167:5)
at Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:44:7)
at new Promise (<anonymous>)
at middleware (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:43:12)
at Promise.all.Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:43:7)
at new Promise (<anonymous>)
at C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:42:5
at dispatch (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-compose\index.js:42:32)
TypeError: res.getHeader is not a function
at processRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:82:18)
at ready (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:51:12)
at handleRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:167:5)
at Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:44:7)
at new Promise (<anonymous>)
at middleware (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:43:12)
at Promise.all.Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:43:7)
at new Promise (<anonymous>)
at C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:42:5
at dispatch (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-compose\index.js:42:32)
TypeError: res.getHeader is not a function
at processRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:82:18)
at ready (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:51:12)
at handleRequest (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\util.js:167:5)
at Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:44:7)
at new Promise (<anonymous>)
at middleware (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\webpack-dev-middleware\lib\middleware.js:43:12)
at Promise.all.Promise (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:43:7)
at new Promise (<anonymous>)
at C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-webpack\index.js:42:5
at dispatch (C:\Users\SWK\AppData\Roaming\npm\node_modules\@compositor\x0\node_modules\koa-compose\index.js:42:32)
Terminate batch job (Y/N)? y
nitta-honoka commented
same issue
emplums commented
I believe this issue is similar to another in mdx-deck: jxnblk/mdx-deck#269
As an interim solution, you can add webpack-dev-middleware@3.6.0
to your deps and it should work!