Error: bundling failed: error: unable to resolve module

When I was learning react native to load local with imgae, I encountered this problem. The code is like this

In the images folder of the root directory, there are backicon.png This picture is

According to the path configured above, the image can be located in the code, but the actual running test reported an error, and the image could not be found. Later, the test found that it was necessary to write like this

After changing to this, it can run normally, because refers to the image Login.js Different from the folder level of an image, you need to jump to the same level to find it. However, it’s not clear why you can also point out the path of the image without adding.. /.

Read More: