Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module not found: Can't resolve '../styles/global.css' in an next.js project [closed]

enter image description hereI am following the instruction on : https://nextjs.org/learn/basics/assets-metadata-css/global-styles

And getting error message when adding import '../styles/global.css' to _app.js

./pages/_app.js Module not found: Can't resolve '../styles/global.css' in 'C:\Users\Owner\Documents\tradingCFD\pages'

like image 393
Helmar Bachle Avatar asked Sep 05 '25 05:09

Helmar Bachle


1 Answers

Your global.css seems to be in public/styles., not just styles/. The styles directory should be moved up a level to be in the app root.