Reputation: 5452
I am following this tutorial to create a React project with webpack. Everything went smooth until step 4 webpack --config webpack.config.js
, where I get this error:
webpack not installed
Install webpack to start bundling:
$ npm install --save-dev webpack
But if I type webpack --version
, I get 4.43.0
.
I don't know what is wrong.
Upvotes: 1
Views: 298
Reputation: 1105
Based on the information you gave, your webpack.config.js might be invalid, e.g., importing missing module, or not exporting proper configuration.
See this issue for more context: https://github.com/webpack/webpack/issues/9242#issuecomment-500350448
Upvotes: 1