0

An error in REACT displaying a MODULE NOT FOUND ERROR

How this error started was, that I was trying to add a background image with a tailwind CSS and suddenly got this error and later commented on the code and still displaying the same error. tried all possible ways that I can think of still not working.. would like to hear from the community.

1 Answer 1

1

I think you put images in public folder of reactJs structure. If that is true then you wrongly call the image just use

<img src="./images/bg-card-front.png" alt="just an image">

Hope you like my answer, if you found any issue just lemme know.

Sign up to request clarification or add additional context in comments.

3 Comments

You can also import the image inside your component import myImage from './images/img.jpg'
Thanks, but I have also tried commenting on the line of code but still displaying the same error
@peter can you able to share you code on any platform if possible. Lemme check the error.

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.