After setting up Next.js version 14.0.1 on Node.Js v20.9.0 and Ubuntu 20.04, I encountered an error right from the start.
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 tried removing the node_modules
folder and then reinstalled the modules using npm i
. I am aware that next/font is already integrated into Next.js. The path next/font/google/target.css exists in node_modules, but the target.css file is empty.
What could be causing this issue with my application?