Dev server failing with res.getHeader is not a function
See original GitHub issueWanting to try out mdx-deck as an awesome Markdown based presentations tool I followed the quick start in the readme using mdx-deck v1.10.0.
I have a simple deck.mdx
with my slides ad want to run that with "start": "mdx-deck deck.mdx"
in my npm scripts.
What happens
My browser opens a new tab at http://127.0.0.1:8080/
which keeps on loading forever without ever finishing. (waited five+ minutes)
The same happens when i visit http://localhost:8080/
in my browser.
What I would expect
I would expect to see the presentation display in my browser.
Further observations
Using the mdx-deck build
script works just fine.
When I Ctrl + C
out of the process it shows the following error: TypeError: res.getHeader is not a function
, or more fully:
TypeError: res.getHeader is not a function
at processRequest (/Users/X/stuff/talks/my-presentation-name/node_modules/webpack-dev-middleware/lib/middleware.js:82:18)
at ready (/Users/X/stuff/talks/my-presentation-name/node_modules/webpack-dev-middleware/lib/util.js:51:12)
at handleRequest (/Users/X/stuff/talks/my-presentation-name/node_modules/webpack-dev-middleware/lib/util.js:167:5)
at Promise (/Users/X/stuff/talks/my-presentation-name/node_modules/webpack-dev-middleware/lib/middleware.js:44:7)
at new Promise (<anonymous>)
at middleware (/Users/X/stuff/talks/my-presentation-name/node_modules/webpack-dev-middleware/lib/middleware.js:43:12)
at Promise (/Users/X/stuff/talks/my-presentation-name/node_modules/koa-webpack/lib/middleware.js:28:9)
at new Promise (<anonymous>)
at /Users/X/stuff/talks/my-presentation-name/node_modules/koa-webpack/lib/middleware.js:27:20
at dispatch (/Users/X/stuff/talks/my-presentation-name/node_modules/koa-compose/index.js:42:32)
I pushed the example that is not working for me here: https://github.com/HoverBaum/mdx-deck-bug-illustration-dev-server
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top GitHub Comments
@HoverBaum I was having this same issue. Just removed
node_modules
, added"webpack-dev-middleware": "3.6.0"
as suggested by @arthyn, runnpm install
and now it is working fine.@HoverBaum It seems a change going from webpack-dev-middleware 3.6.0 to 3.6.1 caused koa-webpack to break. If you downgrade you should be able to get back up and running until it’s fixed there.