Why do I get an error in react regarding my background-image in css

I have no idea why I’m getting this error in my react project. I fixed the URL path and renamed them properly but for some reasons, I keep getting the same error.

This is my CSS:

  background-image: url("../assets/img/header-bg.jpg");

and the other image is

  background-image: url("../assets/img/map-image.png");

This is the error I get:

enter image description here

if the image doesn’t show then the error is this

Error: Can’t resolve ‘../assets/img/header-bg.jpg’ in ‘C:\Users\bryan\start-bootstrap\src\assets\css’

the pathway of my images and CSS is:

src > assets > img > header-bg.jpg,map-image.png

enter image description here

My assets folder also has my CSS folder with my styles which includes bootstrap:

src > assets > css > style.css
 
 

146 thoughts on “Why do I get an error in react regarding my background-image in css”

  1. I simply could not leave your web site before suggesting that I actually enjoyed the standard information an individual provide for your guests? Is gonna be back often in order to inspect new posts.

    Reply
  2. My brother suggested I might like this web site. He
    was totally right. This post actually made my day.
    You can not imagine simply how much time I had spent for this info!

    Thanks!

    Reply
  3. I just could not leave your website before suggesting that I really enjoyed the standard information an individual provide to your visitors? Is going to be back steadily in order to check out new posts.

    Reply
  4. Unquestionably believe that which you said.
    Your favorite justification seemed to be on the web the easiest thing to be aware of.

    I say to you, I definitely get annoyed while people think about worries that they plainly don’t know about.

    You managed to hit the nail upon the top as well as defined out
    the whole thing without having side-effects , people can take a signal.
    Will probably be back to get more. Thanks

    Reply
  5. You could definitely see your expertise in the article you write.
    The sector hopes for more passionate writers such as you who are not afraid to say how they
    believe. All the time follow your heart.

    Reply
  6. Wonderful blog! I found it while surfing around on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?

    I’ve been trying for a while but I never seem to get there!
    Cheers

    Reply
  7. It is appropriate time to make a few plans for the long run and it’s time to be happy.
    I’ve read this submit and if I could I want to
    counsel you few fascinating things or advice. Maybe you can write subsequent articles relating to this article.
    I wish to read more issues about it!

    Reply
  8. Hi! I know this is kinda off topic but I was wondering which blog platform
    are you using for this website? I’m getting fed up of WordPress because
    I’ve had issues with hackers and I’m looking at alternatives
    for another platform. I would be awesome if you could point me in the direction of a good platform.

    Reply
  9. You really make it appear really easy with your presentation but I in finding this topic to be really one thing that I think I might by no means understand. It seems too complex and extremely large for me. I am taking a look forward for your next publish, I will try to get the dangle of it!

    Reply
  10. My coder is trying to persuade me to move to .net
    from PHP. I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using Movable-type on a
    variety of websites for about a year and am concerned about switching to
    another platform. I have heard very good things about blogengine.net.
    Is there a way I can import all my wordpress posts into it?
    Any kind of help would be really appreciated! cheap flights http://1704milesapart.tumblr.com/ cheap flights

    Reply

Leave a Comment