question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresh Angular + Storybook alpha.38 installation throws warnings

See original GitHub issue

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh angular project (8.2)
  2. sb init alpha.38
  3. Start storybook

Expected behavior Should work without warnings

Throws warnings to console

1) Warning: Failed prop type: Invalid prop `options.isToolshown` of type `boolean` supplied to `Layout`, expected `string`.
2) The pseudo class ":first-child" is potentially unsafe when doing server-side rendering. Try changing it to ":first-of-type".
3) Warning: Failed prop type: Invalid prop `Filter` of type `object` supplied to `TreeState`, expected a single ReactElement.
4) Warning: Failed prop type: Invalid prop `List` of type `object` supplied to `TreeState`, expected a single ReactElement.
5) Warning: Failed prop type: Invalid prop `Title` of type `object` supplied to `TreeState`, expected a single ReactElement.
6) Warning: Failed prop type: Invalid prop `Link` of type `function` supplied to `TreeState`, expected a single ReactElement.
7) Warning: Failed prop type: Invalid prop `Leaf` of type `function` supplied to `TreeState`, expected a single ReactElement.
8) Warning: Failed prop type: Invalid prop `Head` of type `function` supplied to `TreeState`, expected a single ReactElement.
9) Warning: Failed prop type: Invalid prop `Section` of type `object` supplied to `TreeState`, expected a single ReactElement
10) Warning: Failed prop type: Invalid prop `Message` of type `function` supplied to `TreeState`, expected a single ReactElement.

System:

  • Browser: [chrome]
  • Framework: [angular]
  • Version: [5.2.0-alpha.38]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
adamdoylecommented, Jul 11, 2019

In the meantime, one can patch-package a local install with this patch for @storybook/ui@5.2.0-alpha.40:

@storybook+ui+5.2.0-alpha.40.patch:

diff --git a/node_modules/@storybook/ui/dist/components/layout/container.js b/node_modules/@storybook/ui/dist/components/layout/container.js
index 35b1cfb..720d450 100644
--- a/node_modules/@storybook/ui/dist/components/layout/container.js
+++ b/node_modules/@storybook/ui/dist/components/layout/container.js
@@ -698,7 +698,7 @@ Layout.propTypes = {
     showNav: _propTypes["default"].bool.isRequired,
     showPanel: _propTypes["default"].bool.isRequired,
     panelPosition: _propTypes["default"].string.isRequired,
-    isToolshown: _propTypes["default"].string.isRequired
+    isToolshown: _propTypes["default"].bool.isRequired
   }).isRequired,
   viewMode: _propTypes["default"].oneOf(['story', 'info', 'docs', 'settings']),
   theme: _propTypes["default"].shape({
diff --git a/node_modules/@storybook/ui/dist/components/sidebar/treeview/treeview.js b/node_modules/@storybook/ui/dist/components/sidebar/treeview/treeview.js
index 9db2012..15d3ffc 100644
--- a/node_modules/@storybook/ui/dist/components/sidebar/treeview/treeview.js
+++ b/node_modules/@storybook/ui/dist/components/sidebar/treeview/treeview.js
@@ -586,14 +586,14 @@ TreeState.propTypes = {
   prefix: _propTypes["default"].string.isRequired,
   dataset: _propTypes["default"].shape({}).isRequired,
   selectedId: _propTypes["default"].string,
-  Filter: _propTypes["default"].element,
-  List: _propTypes["default"].element,
-  Title: _propTypes["default"].element,
-  Link: _propTypes["default"].element,
-  Leaf: _propTypes["default"].element,
-  Head: _propTypes["default"].element,
-  Section: _propTypes["default"].element,
-  Message: _propTypes["default"].element
+  Filter: _propTypes["default"].elementType,
+  List: _propTypes["default"].elementType,
+  Title: _propTypes["default"].elementType,
+  Link: _propTypes["default"].elementType,
+  Leaf: _propTypes["default"].elementType,
+  Head: _propTypes["default"].elementType,
+  Section: _propTypes["default"].elementType,
+  Message: _propTypes["default"].elementType
 };
 TreeState.defaultProps = {
   selectedId: null,

0reactions
lonyelecommented, Jul 25, 2019

@MrBugatti which error are you seeing? This should be fixed by #7405

1) Warning: Failed prop type: Invalid prop `options.isToolshown` of type `boolean` supplied to `Layout`, expected `string`.

and this should be fixed by #7408

3) Warning: Failed prop type: Invalid prop `Filter` of type `object` supplied to `TreeState`, expected a single ReactElement.
4) Warning: Failed prop type: Invalid prop `List` of type `object` supplied to `TreeState`, expected a single ReactElement.
5) Warning: Failed prop type: Invalid prop `Title` of type `object` supplied to `TreeState`, expected a single ReactElement.
6) Warning: Failed prop type: Invalid prop `Link` of type `function` supplied to `TreeState`, expected a single ReactElement.
7) Warning: Failed prop type: Invalid prop `Leaf` of type `function` supplied to `TreeState`, expected a single ReactElement.
8) Warning: Failed prop type: Invalid prop `Head` of type `function` supplied to `TreeState`, expected a single ReactElement.
9) Warning: Failed prop type: Invalid prop `Section` of type `object` supplied to `TreeState`, expected a single ReactElement
10) Warning: Failed prop type: Invalid prop `Message` of type `function` supplied to `TreeState`, expected a single ReactElement.

and this one has been around for awhile #6998

2) The pseudo class ":first-child" is potentially unsafe when doing server-side rendering. Try changing it to ":first-of-type".
Read more comments on GitHub >

github_iconTop Results From Across the Web

@types/storybook__react | Yarn - Package Manager
Angular : set the @ViewChild with a non-empty value in StorybookWrapperComponent (#14586); Addon-docs: Fix ArgsTable sorting when using of={Component} ...
Read more >
Storybook error when using Webpack5 with Next.JS app + ...
Resolved this by installing webpack. If webpack^5.x.x is not installed, just install with npm i -D webpack@^5.x.x..
Read more >
styled-components@5.3.5" has unmet peer dependency ...
Simply installing Storybook HTML with the recommended method causes a ton of dependency warnings to be emitted every time the package manager (Yarn)...
Read more >
storybookjs/storybook (Raised $170.00) - Issuehunt
[Bug]: findDOMNode warnings when running storybook ... Angular output events throw error in fresh Storybook 6.5.0-alpha.22 installation.
Read more >
The Book Thief - SharpSchool
FRESH AIR, AN OLD NIGHTMARE, AND WHAT TO DO WITH A JEWISH CORPSE ... It probably had more to do with the hurled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found