React import problem, ‘Module not found: Can’t resolve’

I have a folder system in my React project, which you can see in the screenshot below:

enter image description here

I am trying to make import to index.js, located in src/components/KeyboardCard/index.js, from file context.js that is located in src/context.js.

enter image description here

I am getting this error message:

Module not found: Can’t resolve ‘…/context.js’ in ‘C:Reacttop-boardsrccomponentsKeyboardCard’.

Help me please.

Answer

It’s two levels higher:

import AppContext from '../../context';