Skip to content Skip to sidebar Skip to footer

Module Not Found: You Attempted To Import Which Falls Outside Of The Project Src/ Directory. Relative Imports Outside Of Src/ Are Not Supported

I have just started React JS, but I have a problem and despite my research I can not get results, I have tried many ways, but I have not been able to solve this problem.Can you hel

Solution 1:

You should use /images/img-2.jpg/ to refer to the folder. The reason is that you are using create-react-app to create this React app. When being bundled the app will be located in the public folder. Read this other question where it mentions the same issue.


Post a Comment for "Module Not Found: You Attempted To Import Which Falls Outside Of The Project Src/ Directory. Relative Imports Outside Of Src/ Are Not Supported"