Unable to resolve styled components

I installed style components in my react app and declared “import styled from ‘styled component’” like zsolt did it in the video. But I got an error message when trying to run the app.

Module not found: Can't resolve 'styled components' in 'C:\Users\Samuel\Documents\_wichtige_Dokumente\Programming\coin-exchange-new\src\components\AccountBalance'

I am sure I just overlooked a small detail. Glad for anyone to help :slight_smile:

1 Like

Did you check if you did install it to ./src/components/AccountBalance/AccountBalance.jsx and not accidentally installed it to another folder? this happened to me, as when you open up a new terminal, it might be you are in a different location.

I installed it in the correct directory. But it cannot find ‘styled components’. What type of data is ‘styled components’?

Hm, I am also having strange issues with styled-components. I am afraid I also don’t know how to fix this issue.

Here is my trouble, in case one lucky day someone from the instructors will have merci on us and help:


To solve application level bugs, it would be better if you provide with a GitHub link of your project progress.

This issue usually arises when styled components module has not been installed correctly. You have to check whether styled-components folder is available in your node_modules folder. If it is, it is properly installed.

1 Like

Apparently the gitignore file made the necessary module invisible to read. I removed gitignore and wrote the ligns again and now it linked. thanks for your help

1 Like