Installing reactJS using webpack

I tried following this guide, but after creating webpack.config.js and running a sanity check:

./node_modules/.bin/webpack --config webpack.config.js

i create this error message:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.resolve has an unknown property ‘modulesDirectories’. These properties are valid:
    object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache
    ?, useSyncFileSystemCalls? }
  • configuration.resolve.extensions[0] should not be empty.

Googling the error is super confusing. I followed the exact step of the guides

okay, looking at the official docs i should have created an app first:

npm init -y

which means, after doing everything again i have the following files and directories in my_app django app:

8001  
assets/
forum/  
manage.py  
my_app/
nginx.conf  
node_modules/
package.json  
readme.txt  
static/  
static_files/  
templates/  
user/
webpack.config.js