storybook: SB 5.2 Typescript build fail - (Addon-knobs)
I’m running into a couple of issues when updating to 5.2.
Both errors seem to be caused by the addon knobs package.
- Complains about a missing dep (manually installing @types/react-color fixes this one)
ERROR in [at-loader] ./node_modules/@storybook/addon-knobs/dist/components/types/Color.d.ts:3:29
TS7016: Could not find a declaration file for module 'react-color'. '/Users/sami/Apps/components/node_modules/react-color/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/react-color` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-color';`
- Second complains about a missing export
ERROR in [at-loader] ./node_modules/@types/storybook__addon-knobs/index.d.ts:13:10
TS2305: Module '"../../../../../../../Users/sami/Apps/components/node_modules/@storybook/react/dist/client"' has no exported member 'RenderFunction'.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 16
- Comments: 15 (7 by maintainers)
Commits related to this issue
- add missing type def to knobs fixes #8105 — committed to storybookjs/storybook by hipstersmoothie 5 years ago
- add missing type def to knobs fixes #8105 — committed to storybookjs/storybook by hipstersmoothie 5 years ago
- add missing type def to addon-knobs fixes #8105 (#8118) add missing type def to addon-knobs fixes #8105 — committed to storybookjs/storybook by shilman 5 years ago
- add missing type def to addon-knobs fixes #8105 (#8118) add missing type def to addon-knobs fixes #8105 — committed to storybookjs/storybook by shilman 5 years ago
@sami616 Ergh. Will release a fix in the next hr
i think so. but still seeing
webpack-envwhen i have uninstall@types/storybook__react.If anyone gets blocked by this, I can recommend adding
skipLibCheck: trueto yourtsconfig.json- because the internal typings of Storybook don’t really matter that much to the type safety of your application code.They can delete the dep on those types now.
Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.2 containing PR #8118 that references this issue. Upgrade today to try it out!
@shilman can we release a patch containing this?