The last major React-related topic we are going to look at is less about React and more about setting up your development environment to build a React app. Up until now, we've been building our React apps by including a few script files:
ERROR in Entry module not found: Error: Can’t resolve ‘babel’ in ‘/Users/GradioMedia/Desktop/MyTotallyAwesomeApp’
BREAKING CHANGE: It’s no longer allowed to omit the ‘-loader’ suffix when using loaders.
You need to specify ‘babel-loader’ instead of ‘babel’,
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
Luckily it’s an easy fix with simply modifying the webpack.config.js file by adding “-loader” to the end of babel:
@kirupa thats an amazing tutorial i am newbie and wanted to know that I have followed the steps…how will it be running in localhost? there is no web-dev-server here so how localhost will be running?
Unless your app is doing something that absolutely needs a server, you can do a lot using just the file system. That is why I originally didn’t mention anything about that.
With that said, I should update the article to mention using a web server, though. It is good practice. Thanks for letting me know. I’ll look into getting this revised soon
oh - it seems that the original post shows the images, but clicking ‘view full post’ does not show them. It seems that the images that work have a missing “/react/” from the file path!
I never even noticed that button! These posts get auto-generated when content on the main kirupa.com site is posted, and the URL for showing the full version is broken. That’s why images don’t load. I’ll fix that shortly. Thanks for pointing that out
one more question - I’m getting some misprinted spaces in my end result  and I’m not sure why. They even show up when I pretty much copy-pasted the entire exercise. Any ideas?
Tyler - are you double clicking inside the code area before copying? If so, that is a bug that I will need to fix where spaces get introduced. If you copy the code by just selecting without double-clicking, you shouldn’t see the space characters. Can you try that and see if it works for you?
This is a great tutorial. It took 5 minutes and now I’m ready to go. Most tutorials lightly cover or skip entirely the initial setup, and the installation on the React website is a little too in depth. This is just right. Thanks, man. Cheers
ERROR in ./dev/index.jsx
Module parse failed: /Users/dstonehill/Documents/ReactProjects/ReactApi/dev/index.jsx Unexpected token (7:6)
You may need an appropriate loader to handle this file type.
| render: function() {
| return (
|