'Module not found: Can't resolve './reducers/index'

Module not found: Can't resolve './reducers/index' in'C:\Users\Dibba\Desktop\rdx\src' This error occurred during the build time and cannot be dismissed.

node version is v9.11.2 npm version is 6.9.1-next.0

structure:

enter image description here

error message :

enter image description here

code:

enter image description here



Solution 1:[1]

Your app is not able to find your root reducer since the file name on disk doesn't match the file name in the code. There appears to be a trailing space in the filename of ./reducers/index.js, from what I can see in your first screenshot. Remove the space and your app should be able to find the file without problem.

Solution 2:[2]

You have to remove the /index from the directory './reducers/index' and set it to './reducers'. It should work.

If the above does not work for you, check the steps below.

Make sure the reducers folder is created in the 'src' directory and create a file named index.js in the reducers folder.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rmlockerd
Solution 2 ouflak