react-router-tutorial
react-router-tutorial copied to clipboard
[add] adds .babelrc file to fix webpack compiling error when running npm start
Without the .babelrc
file, I am unable to successfully compile with npm start
. Now it works. Hopefully this help others like me trying to learn react-router!
What error message are you getting? Maybe you didn't install all your dependencies? Lesson 1 should work and what you have added is done as part of this line https://github.com/reactjs/react-router-tutorial/blob/master/lessons/01-setting-up/webpack.config.js#L11
I took away my .babelrc
file again, and I still get the same error when I ran npm start
initially (after running npm install
for the getting started section).
This is the error message I get, which is fixed by adding .babelrc
file.
I'm not sure why the webpack babel-loader preset isn't working.
Can you try again with the following steps:
git clone https://github.com/reactjs/react-router-tutorial
cd react-router-tutorial
cd lessons/01-setting-up
npm install
npm start