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

localhost not working #119

Open
ipa-swk opened this issue Mar 18, 2019 · 2 comments · May be fixed by #120
Open

localhost not working #119

ipa-swk opened this issue Mar 18, 2019 · 2 comments · May be fixed by #120

Comments

@ipa-swk
Copy link

ipa-swk commented Mar 18, 2019

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
Copy link

same issue

@emplums
Copy link

emplums commented Apr 18, 2019

I believe this issue is similar to another in mdx-deck: jxnblk/mdx-deck#269

As an interim solution, you can add [email protected] to your deps and it should work!

@emplums emplums linked a pull request Apr 18, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants