2

I tried to add a scss style to my "Logo.js" component, and yet and can't manage to fix this error I keep getting:

ERROR in ./src/components/Logo/Logo.js 5:0-19

Module not found: Error: Can't resolve 'logo.scss' in '/Users/antonov/Project/HorlogeV2/src/components/Logo'

Here is my component:

import "logo.scss";


class Logo extends Component {
  render() {
    return (
      <div className="logo">
        <img alt="Logo failed 2 load" src='./Images/Soldierboi.jpeg'/> 
      </div>
    )
  }
}

export default Logo;
0

1 Answer 1

1

import "logo.scss" would look inside node_modules folder. Assuming logo.scss is in the same folder as Logo component, you should import it like this:

import "./logo.scss";
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.