Problems with Setting Up Stephen Grider's Modern React with Redux Udemy Course

Problems with Setting Up Stephen Grider's Modern React with Redux Udemy Course
0.0 0

#1

I’m running into some problems with setting up this repository for Stephen Grider’s Modern React with Redux Udemy course.

Basically I cloned it and ran npm install. Upon running npm start, I get an error Cannot find module ‘C:\Users\sgoldber\Documents\udemy_tutorials\ReduxSimpleStarter\node_modules\webpack-dev-server\bin\webpack-dev-server.js’

I talked with someone on the gitter chat, and he suggested that I should in package.json, replace “start”: “node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js”, with “start”: “webpack-dev-server --open”

That resulted in the error Error: Cannot find module ‘webpack’

I don’t understand why I have this error: webpack and webpack-dev-server are in package.json, but they seem to not be showing up in my node_modules folder.

There’s a discussion here that deals with this exact particular problem and I tried some of their suggestions: nothing seemed to work.

Please let me know as soon as possible what to do! I am starting on the full-stack back end projects (i.e. the voting app) and really need a good refresher on React, and I need to learn Redux on top of that. Thanks so much!


#2

Have you tried installing webpack and the dev server globally?


#3

So, I did the above, and it fixed that error.

However, upon running npm start, I get another error:

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
Module not found: Error: Can’t resolve ‘babel’ in ‘C:\Users\sgoldber\Documents\udemy_tutorials\ReduxSimpleStarter’
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js
webpack: Failed to compile.

How does one fix this error?

Edit: I changed in webpack.config.js loader: ‘babel’ to loader: ‘babel-loader’

That caused a (new) large number of errors, mostly Module not Found errors involving react, redux, ./…/…/process/browser.js and it is really unintelligible.

I really cannot believe that such a popular udemy course has such problems at the very beginning and am so frustrated and dumbfounded. I even did this course a few months ago when I was first learning React for the beginning of the data visualization projects and it worked just fine… :persevere::sob:


#4

I’ve gone through that course myself, but rather than download his repo, I just set up with Create React App and downloaded dependencies as I needed them. I was able to get all the way through with no problems.


#5

I am going to try this. Seems twice as instructive also!