Module Not Found Cant Resolve Components Navbar

[Solved] Module Not Found Cant Resolve Components Navbar | Shell - Code Explorer | yomemimo.com
Question : Module not found: Can't resolve './components/NavBar'

Answered by : yucky-yak-bnicekwns9xb

In your case, App.js is in src/ directory while header.js is in src/components. To import you would do import Header from './components/header'. This roughly translate to in my current directory, find the components folder that contain a header file.
Now, if from header.js, you need to import something from card, you would do this. import Card from '../containers/card'. This translate to, move out of my current directory, look for a folder name containers that have a card file.

Source : https://stackoverflow.com/questions/44439205/cant-resolve-module-not-found-in-react-js | Last Update : Sat, 23 Oct 21

Answers related to module not found cant resolve components navbar

Code Explorer Popular Question For Shell