-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
The pseudo class ":first-child" is potentially unsafe when doing server-side rendering. #6998
Comments
I have also got this error since upgrading. |
I'm also seeing this... except with React. |
same here with React |
Same here after upgrading:
|
Im also seeing this error with React: "react": "^16.4.0",
"react-dom": "^16.4.0" "@storybook/addon-links": "^5.0.11",
"@storybook/addon-notes": "^5.0.11",
"@storybook/addon-storyshots": "^5.0.11",
"@storybook/addon-storyshots-puppeteer": "^5.0.11",
"@storybook/addon-storysource": "^5.0.11",
"@storybook/addons": "^5.0.11", |
Also seeing the same error with Storybook and Vue after upgrading to 5.1.3. |
The error still there |
The error is still there after upgrading (v5.1.3 -> v5.1.7) |
@HiHiPoBang we'll comment here when the issue is fixed. Or feel free to issue a PR to fix it if you're in a rush! 👍 |
the upstream bug: |
same here - react 16.6.3 |
Same here!
|
Any updates about this? 🤔 |
I have a same issue on
|
I have same issue on "@storybook/addon-actions": "^5.1.9",
"@storybook/addon-links": "^5.1.9",
"@storybook/addons": "^5.1.9",
"@storybook/react": "^5.1.9", |
Only deactivating these addons, resolves issue. |
The reason for this error has to do with Other, more generic alternative may be: & > :first-child:not(style), & > style:first-child + * { |
@omrilotan |
Of course. This selector is made up of two parts:
Thus covering both options. <parent>
<style/>
<child/> <!-- this one -->
<other-child/>
</parent>
<parent>
<child/> <!-- this one -->
<other-child/>
</parent> |
IIRC the css to change is here:
|
Same here after upgrading to 6.5.4 :( |
See #18103 |
For anyone else wanting to hack this annoyance away with a |
Same here at |
6.5.6 also. |
the same with storybook/react 6.5.5 |
@vdh could you explain what you mean by this?
|
The same |
6.5.7 - same problem |
6.5.7 - same problem |
diff --git a/dist/cjs/index.js b/dist/cjs/index.js
index 1b8b61eac2d191f1a8e1421a57d2738b37d06937..9137b52c3b624ccc3ac980799785da12f1c93ff9 100644
--- a/dist/cjs/index.js
+++ b/dist/cjs/index.js
@@ -1396,15 +1396,6 @@ var createCache = function createCache(options) {
var omnipresentPlugins = [compat, removeLabel];
- if (process.env.NODE_ENV !== 'production') {
- omnipresentPlugins.push(createUnsafeSelectorsAlarm({
- get compat() {
- return cache.compat;
- }
-
- }), incorrectImportAlarm);
- }
-
if (isBrowser$6) {
var currentSheet;
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
diff --git a/dist/esm/index.js b/dist/esm/index.js
index e7b796a97d657ea711285724a54b40d4c4e06ccf..f65669abd258db602d3d9e32e9b70d7f9002ebda 100644
--- a/dist/esm/index.js
+++ b/dist/esm/index.js
@@ -1445,15 +1445,6 @@ var createCache = function createCache(options) {
var omnipresentPlugins = [compat, removeLabel];
- if (process.env.NODE_ENV !== 'production') {
- omnipresentPlugins.push(createUnsafeSelectorsAlarm({
- get compat() {
- return cache.compat;
- }
-
- }), incorrectImportAlarm);
- }
-
if (isBrowser$6) {
var currentSheet;
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
diff --git a/dist/modern/index.js b/dist/modern/index.js
index 4006f0846b2711d82fef0cad026814307192ba98..f6b2b560e3a708a18830bd2c9139b7f4a622cf33 100644
--- a/dist/modern/index.js
+++ b/dist/modern/index.js
@@ -1366,15 +1366,6 @@ var createCache = function createCache(options) {
var omnipresentPlugins = [compat, removeLabel];
- if (process.env.NODE_ENV !== 'production') {
- omnipresentPlugins.push(createUnsafeSelectorsAlarm({
- get compat() {
- return cache.compat;
- }
-
- }), incorrectImportAlarm);
- }
-
if (isBrowser$6) {
var currentSheet;
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) { |
Please try upgrading to the latest release https://github.com/storybookjs/storybook/releases/tag/v6.5.8
Does that fix it? |
For me - yes! |
The console error has gone after upgrading to 6.5.8 for me. also. |
That works for me! Thanks |
Huge props to @Andarist 🙌 |
@vdh thank you for the explanation! Upgrading to |
Fixes several annoying console errors in storybook. storybookjs/storybook#6998
Upgrading to |
Upgrading to still, there is a message in the browser console
|
Upgrading to v6.5.9 does not work for me as well. |
Upgrading to v6.5.10 doesn't work for me |
Also comes up in v6.5.14. Any solutions for the issue ? |
Also comes up in v6.5.15 |
Any updates on this? We have the same error... |
The same error at storybook 7 |
Also appears in v6.5.16 |
Describe the bug
At the console: The pseudo class ":first-child" is potentially unsafe when doing server-side rendering. Try changing it to ":first-of-type".
To Reproduce
Run the angular demo in this repo and check the console.
Expected behavior
No error log
System:
The text was updated successfully, but these errors were encountered: