Hi, I’m a student and not very experienced with development, but I wanted to try running this project locally.
I followed the setup steps exactly as described, but when I ran npm run dev, I got this error:
Module not found: Can't resolve '@/components/theme-toggle'
The file theme-toggle.tsx does exist in the components folder, so I wasn’t sure why the import failed.
After asking GPT for help, we found the cause:
The tsconfig.json in the repository does not include a paths alias for @/*. Because of that, imports like:
import { ThemeToggle } from "@/components/theme-toggle"
cannot be resolved by Next.js.
Adding the following to compilerOptions fixed the issue:
"baseUrl": ".",
"paths": {
"@/": ["./"]
}
Once I added these lines, the project ran normally.
I wanted to report this because new users—especially beginners like me—may run into the same problem.
Thanks for making this project open-source!
Hi, I’m a student and not very experienced with development, but I wanted to try running this project locally.
I followed the setup steps exactly as described, but when I ran npm run dev, I got this error:
Module not found: Can't resolve '@/components/theme-toggle'
The file theme-toggle.tsx does exist in the components folder, so I wasn’t sure why the import failed.
After asking GPT for help, we found the cause:
The tsconfig.json in the repository does not include a paths alias for @/*. Because of that, imports like:
import { ThemeToggle } from "@/components/theme-toggle"
cannot be resolved by Next.js.
Adding the following to compilerOptions fixed the issue:
"baseUrl": ".",
"paths": {
"@/": ["./"]
}
Once I added these lines, the project ran normally.
I wanted to report this because new users—especially beginners like me—may run into the same problem.
Thanks for making this project open-source!