fullstackreact / react-yelp-clone

Tutorial: Build a Yelp-clone in React
https://www.fullstackreact.com/articles/react-tutorial-cloning-yelp/
MIT License
840 stars 218 forks source link

Couldn't start the server at step: Demo: Basic app.js #29

Closed soumyaa1804 closed 4 years ago

soumyaa1804 commented 4 years ago

I was following along the tutorial but at step Demo: Basic app.js when I ran NODE_ENV=development ./node_modules/.bin/hjs-dev-server it is giving this error:

image

and at http://localhost:3000 it is showing: Cannot GET /

Please help!

soumyaa1804 commented 4 years ago

Okay, Got it! There was some compatibility problem between @babel-core and babel-loader. There was another issue which I found in the console when the terminal was not giving any more errors on running NODE_ENV=development ./node_modules/.bin/hjs-dev-server is that React.creatClass is an undefined function. To fix this install create-react-class npm install create-react-class --save-dev Create a new variable in app.js below ReactDOM import statement var createReactClass = require('create-react-class'); Replace const App = React.createClass in app.js to const App = createReactClass

And everything worked fine :)