Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start produces page with no data #50

Open
JDWong-wag opened this issue Mar 23, 2018 · 2 comments
Open

npm start produces page with no data #50

JDWong-wag opened this issue Mar 23, 2018 · 2 comments

Comments

@JDWong-wag
Copy link

Followed the instructions, no changes made, empty console:
screen shot 2018-03-22 at 6 53 03 pm

@I-keep-trying
Copy link

I'm having the same issue - seems as if there is more configuration needed. In case you are wondering the obvious, yes, I did enter some values into the search box, but nothing happens. I made sure the values were actually in the data as well.

The lookup server is working fine. A test query http://localhost:3001/api/food?q=cheeseburger returned expected results:

[{"carbohydrate_g":28.03,"protein_g":16.51,"fat_g":"13.54","kcal":308,"description":"Fast` foods, cheeseburger; single, reg patty; pln"},
{"carbohydrate_g":25.46,"protein_g":13.49,"fat_g":"12.20","kcal":270,"description":"Fast foods, cheeseburger; single, reg patty, w/ condmnt"}....]

On http://localhost:3000/ there is an error: Uncaught (in promise) Error: HTTP Error Not Found on Client.js, line 15, const error = new Error('HTTP Error ${response.statusText}');.

I didn't change anything in any of the code. I just cloned the repo and pretty much everything worked except this part.

@I-keep-trying
Copy link

OK, I have an update.

For me, the trouble actually started in the instructions, because there was this whole deleting and then replacing the client directory, and the git checkout master -- {client/src,client/semantic,client/semantic.json} syntax simply did not work for me, for some reason - I'm on a Windows machine, using the terminal inside Visual Studio Code, everything is up to date, and 99.9% of the time, I don't have syntax issues with CLI commands; however, I'm not very experienced with git, and this particular command refused to cooperate.

So, after much googling, trying to figure out exactly what that line was supposed to be accomplishing, without any success whatsoever, I decided to just delete my entire project and start over, this time skipping the rm client step. That got me into trouble, which I only fixed after noticing that the package.json in the food-lookup-demo repo was quite different than the one I ended up with, (it did not have semantic-ui, babel-plugin, or enzyme, among other things) making it match, and then running npm i again.

Now, the React app search works as expected! :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants