Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found #41

Open
danlake2012 opened this issue Sep 29, 2022 · 4 comments
Open

Module not found #41

danlake2012 opened this issue Sep 29, 2022 · 4 comments

Comments

@danlake2012
Copy link

Can anyone help me?
I'm an hour into video and it wont even load a simple page. I get the following error.

Compiled with problems:

ERROR in ./src/App.js 6:0-39

Module not found: Error: Can't resolve './components/' in '/home/dan/Desktop/lake-portfolio/frontend_react/src'

i tried everything I can think of. even going to components/navbar/navbar.

@Anirudh-A-V
Copy link

I believe what you have done is importing navbar like
import { Navbar } from './components/';
This will show you an error.

Here react will try to import Navbar from a folder within components which you haven't specified yet. i.e. the endpoint is invalid.
What you should do is
import { Navbar } from './components';

If the issue persists comment here.

@danlake2012
Copy link
Author

Yea, I tried that too. took off the backslash and still the same.

@Anirudh-A-V
Copy link

Can you post the error code here??

@Honcho420
Copy link

Compare your Work/index.js file and the Navbar/index.js. On my side before I fixed it, the default and about was a different color when I compared the files. I fixed it by deleting the index.js file in Navbar and making a new index.js. Then I rewrote the line of code and the colors both matched. Hopefully this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants