React:Ravenous Part 1 Picture bug

When changing the icon on the first step, I keep getting this error:

Failed to compile

./src/components/App/App.jsModule not found: Can’t resolve ‘./logo.svg’ in ‘(Just user names and stuff)\src\components\App’

The step just asked to replace the old picture with a new one and rename it, which i did exactly. I looked into Logo.svg and its a whole lotta numbers i dont want to change. Any ideas?

I think this has to do with a few conflicts within the instructions themselves. The reason why this breaks the way it does is when you are instructed in step 6 to create the App folder and move App.js and App.css into it. What happens here is that App.js contains the line “import logo from ‘./logo.svg’;” which means that it is looking for that file within the same folder that contains App.js, which is the newly created App folder. I don’t know if this is the “correct” answer or not, but what I did to resolve this is to move the logo.svg file from the src folder to the App folder, and when I did that it brought everything back up just fine.

This could be the wrong thing to do, but at the moment it is working for me without any problems yet, so hopefully this will help!

2 Likes

Lol thank you so much! I just skipped that step and hoped all the code i wrote was correct. Made life so much easier