-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing styles in production (NextJS + Chakra) #2343
Comments
I turns out that NextJS Link ( However, it didn't solve the problem, just shift it. Now the Drawer opens correctly, but hovering the "Mon compte" button breaks the design: |
|
|
Hi @Andarist, Thank you for pointing that out. I think this is linked to
RGPA is based on |
That's why OTOH I can only see a single |
Hi @Andarist, Thank you for your input. I've never played with webpack before, nor on this project. I believe in NextJS, you can adapt webpack by modifying Regarding "@emotion/cache@^11.0.0", "@emotion/cache@^11.1.3": <-------------
version "11.1.3"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.1.3.tgz#c7683a9484bcd38d5562f2b9947873cf66829afd"
integrity sha512-n4OWinUPJVaP6fXxWZD9OUeQ0lY7DvtmtSuqtRWT0Ofo/sBLCVSgb4/Oa0Q5eFxcwablRKjUXqXtNZVyEwCAuA==
dependencies:
"@emotion/memoize" "^0.7.4"
"@emotion/sheet" "^1.0.0"
"@emotion/utils" "^1.0.0"
"@emotion/weak-memoize" "^0.2.5"
stylis "^4.0.3"
"@emotion/react@^11.1.1", "@emotion/react@^11.1.5":
version "11.1.5"
resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.5.tgz#15e78f9822894cdc296e6f4e0688bac8120dfe66"
integrity sha512-xfnZ9NJEv9SU9K2sxXM06lzjK245xSeHRpUh67eARBm3PBHjjKIZlfWZ7UQvD0Obvw6ZKjlC79uHrlzFYpOB/Q==
dependencies:
"@babel/runtime" "^7.7.2"
"@emotion/cache" "^11.1.3" <-------------
"@emotion/serialize" "^1.0.0"
"@emotion/sheet" "^1.0.1"
"@emotion/utils" "^1.0.0"
"@emotion/weak-memoize" "^0.2.5"
hoist-non-react-statics "^3.3.1"
react-select@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/react-select/-/react-select-4.3.0.tgz#6bde634ae7a378b49f3833c85c126f533483fa2e"
integrity sha512-SBPD1a3TJqE9zoI/jfOLCAoLr/neluaeokjOixr3zZ1vHezkom8K0A9J4QG9IWDqIDE9K/Mv+0y1GjidC2PDtQ==
dependencies:
"@babel/runtime" "^7.12.0"
"@emotion/cache" "^11.0.0" <-------------
"@emotion/react" "^11.1.1"
memoize-one "^5.0.0"
prop-types "^15.6.0"
react-input-autosize "^3.0.0"
react-transition-group "^4.3.0" |
From what I understand the format of the
Usually, if you end up with multiple copies of a particular library then you have multiple entries like the first one for that particular library. I'm afraid that digging into this further would take me a considerable amount of time that I don't currently have. I could consider diving into this if you would sponsor my work though. |
I already considered sponsoring the open source projects my project is relying on as soon as it is launched. You'll certainly be part of it! Coming from the country of beers, I can certainly see myself contribute to your beer consumption, further help or not 😉 |
Fixed by putting the following in my "resolutions": {
"react-select/@emotion/react": "^11.4.1"
} |
Im currently experiencing the same thing. I have locked the I have also confirmed in my I am also on nextjs. Does anyone have any ideas on how to debug this more? Im completely lost trying to figure this out |
Execute this script asap in your app: var value
Object.defineProperty(window, '__EMOTION_REACT_11__', {
set(newValue) {
value = newValue
debugger
},
get() {
return value
}
}) and inspect the call stack for both calls to this setter |
Thanks @Andarist i can confirm it is indeed the Now the weird thing is I removed the I apologise as I am aware this is probably the wrong place to be asking for help but I seem to always come back to |
It's really hard to advise any further without a repro case - What you have to do is to figure out why this happens. If you are using |
Thanks @Andarist and yea im aware im probably in the wrong spot. Did some more digging and wanted to create a minimum repro example and it turns out as soon as i added |
I added this to package.json and then removed and then reinstalled react-select. Note, I think it should be ^11.1.4 |
Also experiencing this from "resolutions": {
"react-select/@emotion/react": "^11.4.1"
} Is the best course of action installing |
Current behavior:
Styles present in development:
Are missing in production:
To reproduce:
The only difference between the menus are depending on the auth state: showing or not additionnal button actions. I suspect something is breaking the style in the
Menu
component. But I tried a lot of things, I don't understand what's the issue..https://github.com/binajmen/chakra-nextjs/blob/develop/components/layout/Menu.tsx
Note that in development (
yarn dev
), I have no styling issue.Expected behavior:
Environment information:
The text was updated successfully, but these errors were encountered: