CSS is not applied when deploying to Vercel
Answered
Pug posted this in #help-forum
PugOP
I don't understand why this can happen, when building locally and running the start command, the results are displayed in CSS, but when deploying to Vercel the CSS doesn't appear
69 Replies
Toyger
you need to check console in chrome dev tools, there should be errors
Toyger
try to remove
npm run build && npm run start
and can you show your tailwind.config file
something wrong with tailwind
.next folder and run site locally with npm run build && npm run start
and can you show your tailwind.config file
something wrong with tailwind
@Pug
PugOP
wait
It's not a problem when using buns, I thought the buns were affecting this, but it doesn't seem like it
Toyger
Did you try to run it in production mode locally with removing .next folder?
And I didn't understand about bun, you say its not a problem when you using it, can you try with npm or yarn?
And I didn't understand about bun, you say its not a problem when you using it, can you try with npm or yarn?
PugOP
wait
PugOP
trying using npm
bruh not work
@Toyger
do you need to share screen?
@Pug bruh not work
Toyger
but what about running it locally as production build?
npm run build && npm run start
npm run build && npm run start
@Pug Click to see attachment
Toyger
maybe you are not uploading some file to github? Like tailwind config itself or something other.
Is your repo public? Can you give me link?
Is your repo public? Can you give me link?
PugOP
private
wait i will screen shoot
@Toyger your username github
i will add you to contributors
@Pug <@536484914221285376> your username github
Toyger
my github @sergeymalinka
PugOP
Toyger
first one
PugOP
done
if any some error live on supabase, just disable it
@Toyger already accept the invite?
Toyger
yeah
PugOP
okay
@Pug okay
Toyger
you definetely have something differently locally, this is straight from repo, dev environment
it's straight from the source
Is there something wrong?
@Toyger
Toyger
for me it works exactly same as for vercel, so you have something different locally, I am trying to understand why tailwind not working properly
PugOP
hmmm
can voice? @Toyger
Toyger
nope, only text
PugOP
what you use?
npm or yarn?
@Toyger
Toyger
yarn
PugOP
try using npm
@Toyger so whats wrong btw?
Toyger
same thing with npm.
I don't know yet what's wrong, trying to find a problem.
I don't know yet what's wrong, trying to find a problem.
PugOP
If you say Tailwind is the problem, in the repo and local the code is the same
@Pug Click to see attachment
Why are you ignoring postcss.config.js?
postcss.config.js and bun.lockb should be committed to git, not ignored
postcss.config.js in particular is necessary for postcss to work. Tailwind is dependent on postcss.
PugOP
Ohw
Wait i Will try to push it again
@joulev Why are you ignoring postcss.config.js?
PugOP
I didn't know that, because the nextjs settings itself created the gitignore file and its contents
Still not working
I have unignore postcss.config.js and Bun.lockb
So does it show up in the GitHub repo? Does it show up when you go to the Vercel deployment -> Source?
If you clone your repo in a blank directory and build it there, does it work?
@joulev So does it show up in the GitHub repo? Does it show up when you go to the Vercel deployment -> Source?
PugOP
yes it shows up in my repo
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
nothing inside the postcss btw
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
nothing inside the postcss btw
i have clone it and installing all package
PugOP
@Toyger how's it going?
Lakeland Terrier
I am having the same or a very similar issue.
PugOP
@Toyger @Lakeland Terrier ok its work
PugOP
just unignore next-env.d.ts on gitignore
Answer
PugOP
nothing fixed on tailwind