Issue
I installed Next.js 14.0.1 in Node.Js v20.9.0 and ubuntu 20.04 . The program gives an error at the very beginning.
Failed to compile
/var/www/html/C#/nextApp/app/layout.js
Module not found: Can't resolve 'next/font/google/target.css?{"path":"app/layout.js","import":"Inter","arguments":[{"subsets":["latin"]}],"variableName":"inter"}'
I removed node_modules
folder once and reinstalled modules by running npm i
. Of course I know next/font has been built into Next.js. There is path next/font/google/target.css in node_modules but target.css file is empty.
What is wrong with my app?
Solution
I found what's the problem and any errors that happen in the first. My project path of was "/var/www/html/C#/nextApp". While better be this: "/var/www/html/Csharp/nextApp". Apparently, it is sensitive to symptoms. I found this problem from _document.js in ".next/server/pages/".
Answered By - ParisaN
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.