plotly / dash-component-boilerplate

Get started creating your own Dash components here.
276 stars 184 forks source link

Type Error with Example #63

Open chschoenenberger opened 5 years ago

chschoenenberger commented 5 years ago

Currently I am unable to run the vanilla boilerplate without any changes. I run cookiecutter with all default options except for the author name and email address. If I run "npm run start" on the newly generated project, it should display the example input component. However, I get the following error:

TypeError: res.getHeader is not a function at processRequest (C:\source\my_dash_component\node_modules\webpack-dev-middleware\lib\middleware.js:82:18) at cbs.forEach (C:\source\my_dash_component\node_modules\webpack-dev-middleware\lib\context.js:52:9) at Array.forEach () at process.nextTick (C:\source\my_dash_component\node_modules\webpack-dev-middleware\lib\context.js:51:11) at process._tickCallback (internal/process/next_tick.js:61:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! my_dash_component@0.0.1 start: webpack-serve ./webpack.serve.config.js --open npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the my_dash_component@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\myUser\AppData\Roaming\npm-cache_logs\2019-03-13T10_04_36_318Z-debug.log

I assume there's something wrong with the dependencies. However, I am unable to resolve it myself.

lavenderca commented 5 years ago

Hi! Did you make any progress resolving this error? I'm running into the same issue. Thanks!

dolun commented 5 years ago

Exactly the same problem:

TypeError: res.getHeader is not a function at processRequest (/Users/thomas/dash/composants_dash/node_modules/webpack-dev-middleware/lib/middleware.js:82:18) at cbs.forEach (/Users/thomas/dash/composants_dash/node_modules/webpack-dev-middleware/lib/context.js:52:9) at Array.forEach () at process.nextTick (/Users/thomas/dash/composants_dash/node_modules/webpack-dev-middleware/lib/context.js:51:11) at process._tickCallback (internal/process/next_tick.js:61:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! composants_dash@0.0.1 start: webpack-serve ./webpack.serve.config.js --open npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the composants_dash@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/thomas/.npm/_logs/2019-03-22T21_03_22_508Z-debug.log

mbkupfer commented 5 years ago

Had the same issue on my end. npm install webpack-dev-middleware@3.6.0 fixed this for me...hope it works for you!

As a side note, adding a package-lock.json to the cookiecutter would be able to fix this.

oipotty commented 5 years ago

I have the same error and the npm install webpack-dev-middleware@3.6.0 didn't work for me. Any other solutions? Thanks!