You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a promise based configuration the error responds with
TypeError: Cannot read property 'bonjour' of undefined
at createConfig (node_modules/webpack-dev-server/lib/utils/createConfig.js:13:12)
at processOptions (node_modules/webpack-dev-server/lib/utils/processOptions.js:22:19)
When using a promise to launch webpack-dev-server the
in
//processOptions.js functionprocessOptions(config,argv,callback){// processOptions {Promise}if(typeofconfig.then==='function'){///ERROR HERE -- argv is not passed ///config.then(processOptions).catch((err)=>{// eslint-disable-next-line no-consoleconsole.error(err.stack||err);// eslint-disable-next-line no-process-exitprocess.exit();});return;}
Actual Behavior
Should be something like
functionprocessOptions(config,argv,callback){// processOptions {Promise}if(typeofconfig.then==='function'){///Fixed by passing argv.config.then(c=>processOptions(c,argv,callback)).catch((err)=>{// eslint-disable-next-line no-consoleconsole.error(err.stack||err);// eslint-disable-next-line no-process-exitprocess.exit();});return;}
For Bugs; How can we reproduce the behavior?
A solution is above.
For Features; What is the motivation and/or use-case for the feature?
Activity
hiroppy commentedon May 31, 2019
thanks, duplicated of #1945, so I'll close
hiroppy commentedon May 31, 2019
If you have the reproducible repo, please submit it.
jspears commentedon May 31, 2019
yeah but this one has a fix.
Merge branch 'master' into fix-#1946