adrianhajdin / project_professional_portfolio

This is a code repository for the corresponding YouTube video. In this tutorial we are going to build and deploy a real time chat application. Covered topics: React.js, SCSS, Framer Motion, Sanity
https://jsmastery.pro
2.07k stars 495 forks source link

Module not found #41

Open danlake2012 opened 2 years ago

danlake2012 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

Anirudh-A-V commented 2 years ago

Can you post the error code here??

Honcho420 commented 2 years ago

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