storybook: Upgrade from 5.1.9 -> 5.2.0 breaking with knobs

Describe the bug We have upgraded from 5.1.9 -> 5.2.0 however now we are getting a few errors regarding knobs. Has anyone else experienced this?

Also are there changes we maybe need to implement for 5.2.0? Or a upgrade doc?

ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Array.d.ts
ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Array.d.ts(4,53):
TS2304: Cannot find name 'readonly'.

ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Array.d.ts
ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Array.d.ts(4,62):
TS2693: 'string' only refers to a type, but is being used as a value here.

ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Options.d.ts
ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Options.d.ts(4,134):
TS2304: Cannot find name 'readonly'.

ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Options.d.ts
ERROR in C:/..-apps/io-storybook/node_modules/@storybook/addon-knobs/dist/components/types/Options.d.ts(4,143):
TS2365: Operator '>' cannot be applied to types 'boolean' and 'undefined[]'

...

To Reproduce Steps to reproduce the behavior: npm update

Expected behavior Build successfully

Code snippets Working:

    "@storybook/addon-actions": "5.1.9",
    "@storybook/addon-info": "5.1.9",
    "@storybook/addon-knobs": "5.1.9",
    "@storybook/addon-links": "5.1.9",
    "@storybook/addon-notes": "5.1.9",
    "@storybook/addon-options": "5.1.9",
    "@storybook/addons": "5.1.9",
    "@storybook/angular": "5.1.9",

Breaking:

    "@storybook/addon-actions": "5.2.0",
    "@storybook/addon-info": "5.2.0",
    "@storybook/addon-knobs": "5.2.0",
    "@storybook/addon-links": "5.2.0",
    "@storybook/addon-notes": "5.2.0",
    "@storybook/addon-options": "5.2.0",
    "@storybook/addons": "5.2.0",
    "@storybook/angular": "5.2.0",

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 11
  • Comments: 30 (18 by maintainers)

Most upvoted comments

same problem here. updating typescript to the latest version fixed it. โ€œtypescriptโ€: โ€œ^3.6.3โ€

We have the same issue that knobs stops working when upgrading to 5.2. But we got no errors at all.

๐Ÿ‘ It works in 5.2.5 for me!

Knobs are back! ๐Ÿš€

it works with any errors.

with? or without?! ๐Ÿ˜•

Sorry, withOUT errors (changed it already).

@fabiradi 5.3.0-alpha.1 was a bad release. re-releasing with a fix now.

facing same issue