Can't find CSS module in Route Group Layout
Answered
qwrts posted this in #help-forum
qwrtsOP
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:
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
- I tried keep the css file in root
- I tried set the path
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
folderAnswered by West African Crocodile
in layout.tsx of root import './globals.css'
in nextjs, all of css file shared
good luck
in nextjs, all of css file shared
good luck
8 Replies
West African Crocodile
in layout.tsx of root import './globals.css'
in nextjs, all of css file shared
good luck
in nextjs, all of css file shared
good luck
Answer
qwrtsOP
nothing wrong with the root layout but it happened in group route layout
West African Crocodile
I mean you don't need import css file in other tsx files without root layout
ofc, when import css in root layout
qwrtsOP
Oh i got it
How could i forget about this lmao
West African Crocodile
I am alright
qwrtsOP
thanks a lot for help