React unable to import component -- module not found

You have a typo in your import. You're requesting MyCompontent. Change to:

import MyComponent from "./components/MyComponent";

And all typos as well.


You can try to import MyCompontent from "./components/MyCompontent.js"

like this

import MyCompontent from "./components/MyCompontent.js";

For anyone coming here without a typo, and is using Webpack, be sure to check for a clause like this:

resolve: {
    extensions: [".jsx", ".js"]
},

in your webpack.config.js.

This tells your transpiler to resolve statements like:

import Setup from './components/Setup'

to

import Setup from './components/Setup.jsx'

This way you don't need the extension.