Closed Amin52J closed 8 years ago
got it working by changing the port and running the server on webpack instead of npm with the following command:
webpack-dev-server --port 3000 --inline --content-base
Thanks for the tricks! It does not work for me until I change to new port too.
I tried to get into react following the react tutorials and got it working, but when I started to go to the next step and use react-router through this tutorial I failed every time!
When I follow the instructions everything seems to be working OK, no errors on terminal, but I don't see any bundle.js files created in my project folder nor the localhost:8080 shows anything other than the following error in console:
I tried installing npm locally and globally but none worked, same as webpack. Also I tried running the servers using webpack with the code
webpack ./index.js bundle.js
doesn't work either and throws the following error in terminal:While this code creates the bundle.js file and if I run this folder through MAMP on the localhost I can see the desired content of the tutorial, when I change anything in the App.js it doesn't take effect until I remove the bundle.js and do the process I mentioned earlier again in the terminal while still seeing the following error in the console:
And if I don't remove bundle.js I get this error in the console:
Any ideas? or alternatively any suggestion or tutorial on how to use react-router?