#Can't find CSS module in Route Group Layout

10 messages · Page 1 of 1 (latest)

charred widget
#

I'm trying to create another layout inside Route Group and importing CSS but the issue is once i loaded the page. The error appears: Module not found: can't resolve './globals.css'

And its weird that the autocomplete can't even find the global css file

  • I tried move global.css into Public folder and import by /globals.css
  • I tried keep the css file in root /app and using root path (@) and import it by import '@/globals.css'
  • I tried set the path .././globals.css to pointing it in root /app folder
frozen snowBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

jovial pollen
#

in layout.tsx of root import './globals.css'
in nextjs, all of css file shared
good luck

charred widget
jovial pollen
#

I mean you don't need import css file in other tsx files without root layout

#

ofc, when import css in root layout

charred widget
#

Oh i got it

#

How could i forget about this lmao

jovial pollen
#

I am alright

charred widget
#

thanks a lot for help