Next.js Discord

Discord Forum

Next tutorial - cannot find Cannot find module '@/app/ui/fonts'

Unanswered
Atlantic mackerel posted this in #help-forum
Open in Discord
Atlantic mackerelOP
when I deploy my aplication via github I get this error:
  1 | import { GlobeAltIcon } from '@heroicons/react/24/outline';
> 2 | import { lusitana } from '@/app/ui/fonts';
    |                          ^
  3 |
  4 | export default function AcmeLogo() {
  5 |   return (
Error: Command "npm run build" exited with 1

thanks for helps

8 Replies

Atlantic mackerelOP
Giant panda
Check the correct file path and name on GitHub. It's very likely you have committed it with different capitalization.
Atlantic mackerelOP
the file path is correct check my github : https://github.com/thomas370/Learn_Next/tree/main/app/ui
I think I've made another mistake, I don't understand anything even though I haven't touched anything.
Giant panda
The page file is empty.
Special files in the app router, including pages and routes must have specific exports.
Did you find a solution? I'm having the same problem rn. I checked both in my source code and GitHub repo that I have fonts.ts with correct spelling, yet still.
Nevermind, I fixed it.