# webpack installation, invalid configuration object

**URL:** <https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521>\
**Category:** web dev\
**Created:** [October 10, 2020, 10:19pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521 "2020-10-10T22:19:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdglauvygiadn](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdglauvygiadn/32/12570_2.png) [@kdglauvygiadn](https://forum.kirupa.com/u/kdglauvygiadn)\
**Post date:** [October 10, 2020, 10:19pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/1 "2020-10-10T22:19:00Z")

</div>

Please I know I might be doing something wrong, but surely I need help. At first I had problem with installing webpack, which I hope I got to work finally by installing it globally, but then trying to run the app, I got this problem. The English is pretty clear but being new I have no idea what went wrong and how to solve it please help me. Thanks in advance  
Below is a screenshot of my cmd:

 ![Capture1](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/2X/c/cb4876a1ffa7f13bc05e9016fadd14187a6d8499.png)

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [October 10, 2020, 10:28pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/2 "2020-10-10T22:28:09Z")

</div>

Are you able to use create-react-app to create a new/blank app and have it run?

---

<div class="post-metadata">

**Author:** ![kdglauvygiadn](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdglauvygiadn/32/12570_2.png) [@kdglauvygiadn](https://forum.kirupa.com/u/kdglauvygiadn)\
**Post date:** [October 10, 2020, 10:35pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/3 "2020-10-10T22:35:59Z")

</div>

yes Sir please I am able to do that: Screenshots below

 ![Capture2](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/2X/1/13e7bf321705da55e767d0c726d1e75439a10587.png) ![Capture3|690x362]

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [October 11, 2020, 1:58am UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/4 "2020-10-11T01:58:07Z")

</div>

That is really strange. This means your webpack and everything else is configured properly. Can you share your source code for your project?

---

<div class="post-metadata">

**Author:** ![kdglauvygiadn](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdglauvygiadn/32/12570_2.png) [@kdglauvygiadn](https://forum.kirupa.com/u/kdglauvygiadn)\
**Post date:** [October 11, 2020, 9:52pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/5 "2020-10-11T21:52:02Z")

</div>

My index.js files starts here: 🦄

```auto
import React from "react";
import ReactDOM from "react-dom";
var HelloWorld = React.createClass({
    render: function () {
        return (
            <p>Hello, {this.props.greetTarget}!</p>
        );   
 }
});
ReactDOM.render(
    <div>
        <HelloWorld greetTarget="Batman" />
    </div>,
    document.querySelector("#container")
);

```

My index.html starts here ✍🏻

```auto
<!DOCTYPE html>
<html><head>
    <title>React! React! React!</title>
</head><body>
    <div id="container"></div>
    <script src="output/myCode.js"></script>
</body></html>

My package.json starts here :writing_hand:t2:
**{
  "name": "mytotallyawesomeapp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel-loader": "^8.1.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "webpack": "^5.0.0"
  },
  "babel": {
    "presets": [
      "es2015",
      "react"
    ]
  },
  "devDependencies": {
    "webpack-cli": "^4.0.0"
  }
}

```

\*\*  
My webpack.config.js starts here ✍🏻

```auto
var webpack = require("webpack");
var path = require("path");
var DEV = path.resolve(__dirname, "dev");
var OUTPUT = path.resolve(__dirname, "output");
var config = { entry: DEV + "/index.jsx",
    output: {
        path: OUTPUT,
        filename: "myCode.js"
    },
    module: {
        loaders: [{
            include: DEV,
            loader: "babel", }] } };
module.exports = config;

```

---

<div class="post-metadata">

**Author:** ![kdglauvygiadn](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kdglauvygiadn/32/12570_2.png) [@kdglauvygiadn](https://forum.kirupa.com/u/kdglauvygiadn)\
**Post date:** [October 11, 2020, 10:02pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/6 "2020-10-11T22:02:44Z")

</div>

![Capture4](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/2X/e/e0471c72de65fc201cb3f3b64fe9fb396a6fe295.png)  
This is the HelloWorld project I did using your youtube channel today, All these make me to think my problem is coming from the advanced version of webpack I am using compared to what you used in the book…All the same I here to learn from you. Thank you

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [October 11, 2020, 11:17pm UTC](https://forum.kirupa.com/t/webpack-installation-invalid-configuration-object/644521/7 "2020-10-11T23:17:27Z")

</div>

I meant, can you upload your source files (like your project) to directly to github or as a Zip file? I’d like to run the exact same commands locally on your version of the project and see why it isn’t working.

The chapter in the book corresponds to this version here: [https://www.kirupa.com/react/using\_redux\_with\_react.htm](https://www.kirupa.com/react/using_redux_with_react.htm) These instructions worked for me 🙂
