@1136445496345501768
Can you share your page.tsx in the (payload) folder
This is only happening in production?
Also Payload versions
only in production
payload version "^3.2.1"
src/app/(payload)/admin/[[...segments]]/page.tsx/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import type { Metadata } from 'next'
import config from '@payload-config'
import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
import { importMap } from '../importMap'
type Args = {
params: Promise<{
segments: string[]
}>
searchParams: Promise<{
[key: string]: string | string[]
}>
}
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
generatePageMetadata({ config, params, searchParams })
const Page = ({ params, searchParams }: Args) =>
RootPage({ config, params, searchParams, importMap })
export default Pagemy react version is
19.0.0-rc-65a56d0e-20241020, I updated like 4 seconds ago to the latest:
19.0.0-rc-7670501b-20241124. gonna have to wait for the ci/cd to finish to see if that fixes it
is there anything else you need?
I doubt bumping react will fix it but lmk, I'm looking into it
Thanks for the quick reply
If that doesn't work, weird as it may sound, can you trying changing custom.scss to custom.css
In (payload) and giving that a shot?
it seems custom.scss is completely empty?
Yeah, it's for custom styles
would it be okay to just straight up delete it?
But it's weirding me out because it used to be just custom.css
You can try but I'm pretty sure it'll just regenerate
upgrading to the latest react version does not solve it
I'll modify it to .css
I am not even sure how its able to compile scss at all...
Oh wait check layout.tsx
there is no scss in the package.json
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '@payload-config'
import '@payloadcms/next/css'
import type { ServerFunctionClient } from 'payload'
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts'
import React from 'react'
import { importMap } from './admin/importMap.js'
import './custom.scss'
type Args = {
children: React.ReactNode
}
const serverFunction: ServerFunctionClient = async function (args) {
'use server'
return handleServerFunctions({
...args,
config,
importMap,
})
}
const Layout = ({ children }: Args) => (
<RootLayout config={config} importMap={importMap} serverFunction={serverFunction}>
{children}
</RootLayout>
)
export default Layoutits completely stock
Ok, after you change to .css adjust the reference in there too
Hmm also
@payloadcms/next/csssi suspicious but those are the admin ui styles
the weird thing is that the
sassdependency is not even installed in this project
@654031862146007055Yeah, I hear ya but it's installed in admin, but obviously it has to be processed so I'm not sure why the custom is a scss
it used to be just custom.css
~/app $ yarn info sass
Usage Error: No package matched your request
$ yarn info [-A,--all] [-R,--recursive] [-X,--extra #0] [--cache] [--dependents] [--manifest] [--name-only] [--virtuals] [--json] ...you sure?
Am I sure what?
That scss is used in the Admin ui styles? Yes
that I don't need to include sass
Shouldn't need to include sass
To run it
alright
well... deploy pipeline is running. I'll let you know in a minute
same error
You changed .scss and the reference in layout yeah?
yes both
I'm confused why it's custom.scss now since by the time the admin ships to you the sass gets bundled as css and included in /dist/styles.css and exported as /next/css already, so I don't think it's
@payloadcms/next/csscurious too see whether this error happens when building a default template
or is it something specific to our configs
That's a good question
Are you guys importing custom css into custom components anywhere in configs?
Can you double check
I do have a few custom components, but no custom css
i have some components with
import 'react-toastify/dist/ReactToastify.css';
including sass as dev dependency does indeed not fix it
Why not just use the sonner tooltip that comes out of the box?
I'll try removing it from the layout
Your admin styles will go goofy but yeah
I have git, so if it gets regenerated I'll be able to see it and just remove it again
thats a good point, i havent got to cleaning up my older components but will switch to sonner
Somehow I wonder if excluding the css import for admin styles will fix it
funnily enough, removing the scss and editing the layout does not fix it
Greyshadow about to drop a bomb
I am guessing when building, they are regenerated?
Can you try removing the
@payloadcms/next/cssfrom layout
Oh, you
didremove it?
huh, but both are used?
I removed the scss import from the layout
didnt work
No no, I mean
import '@payloadcms/next/css'I can try
I think that its gonna break the entire admin ui
Yeah, they
arethe styling of the ui
But I think somethings not being resolved correctly
Honestly not too sure
well... the style certainly is missing in my dev build so far
doomed to wait 5 minutes for my pipeline every time
/next/dist/prod/styles.cssare the style sfor the whole admin ui, in the package.json (near the bottom) it gets mapped to
/next/cssSo that's what
/next/cssimport is
guess we doing over time
Hmm I'm not getting this issue on a local build of the templates
FROM node:20.11.0-alpine AS base
WORKDIR /home/node/app
RUN mkdir -p /home/node/app/media \
&& chown node /home/node/app/media
RUN corepack enable && corepack prepare yarn@4 --activate
RUN apk add --update git
FROM base AS production
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install
COPY . .
ENV NODE_ENV=production
RUN mkdir .next && chown node:node .next
USER node
RUN yarn build
CMD ["yarn", "start"]this is how I build for production
doesn't work
everything just looks broken now
Lol yeah
exact same error
Damn
Nothing stands out to me in your dockerfile
Also docker?
im leaving the office for today, maybe tomorrow I can further investigate
Sounds good, I'll keep looking into it and will come back here if I find anything useful
nope, no docker here
will also report back if i find something
Might be this:
https://discord.com/channels/967097582721572934/967097582721572937/1311745921012338788Not sure tho
Good news:
https://github.com/payloadcms/payload/pull/9603/filesNext release I suppose
Turns out it
wasthe issue above
Will have a canary ready in the next 5m, then you don't need to wait for the next release ^^
Absolutely sensational
Thanks Alessio
you're welcome! Here's the canary with the fix:
3.2.2-canary.a11698b@1136445496345501768
@597024527070920704
Ah classic
Thanks for the fix Alessio
Oh funny, I don't have permission to make it as solved :p
Maybe because I moved it?
Likely
oh strange, the bot should be able to detect the thread creator for moved threads
Thanks
@360823574644129795I just did a deployed a release this morning with the canary version, and it has indeed been fixed
Thanks again
You guys should be able to move off canary and on to 3.2.2 now that it's released
👏🏼 good stuff
guess we doing overtime again 💀
Star
Discord
online
Get dedicated engineering support directly from the Payload team.