Cannot read property ‘replace’ of undefined

If you get the following while setting up a new React/Babel/Webpack project you forgot to install all of the presets. > webpack-dev-server –content-base client –inline –hot /…/node_modules/webpack/lib/NormalModuleFactory.js:72 var elements = request.replace(/^-?!+/, “”).replace(/!!+/g, “!”).split(“!”); ^ TypeError: Cannot read property ‘replace’ of undefined at /Users/…/node_modules/webpack/lib/NormalModuleFactory.js:72:26 at /Users/…/node_modules/webpack/lib/NormalModuleFactory.js:28:4 at /Users/…/node_modules/webpack/lib/NormalModuleFactory.js:159:3 at NormalModuleFactory.applyPluginsAsyncWaterfall (/Users/…/node_modules/tapable/lib/Tapable.js:75:69) at NormalModuleFactory.create (/Users/…/node_modules/webpack/lib/NormalModuleFactory.js:144:8) at /Users/…/node_modules/webpack/lib/Compilation.js:214:11… Continue reading Cannot read property ‘replace’ of undefined

Published
Categorized as Programming