I had installed it globally by running npm install webpack -g and I had included it in my project by running npm install webpack --save-dev.
However, on running the
also after checking the right file name which should be 'webpack.config.js', a good note is to check where the 'webpack.config.js' file is located. it should be in the same folder as your package.json file is located