JavaScript Automating Your Development with webpack Dev Server

benjaminmosery
benjaminmosery
5,240 Points

Npm Start Won't Work (Cannot read property of 'babel' undefined.)

After trying to run the Webpack Dev Server, I get the following error:

ERROR in ./src/index.js
Module build failed: TypeError: Cannot read property 'babel' of undefined
    at Object.module.exports (C:\Users\bmose\Webpack\Dev Server\node_modules\babel-loader\lib\index.js:103:36)
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

How do I fix this?

benjaminmosery
benjaminmosery
5,240 Points

To fix this I updated npm (npm i npm@latest -g ).