adrianbielawski / storybook-color-picker

A Storybook addon. Choose a color from custom color palette and set it on component's control and/or copy it to clipboard.
13 stars 1 forks source link

Does not work with Storybook v8 #544

Open jenwachter opened 3 months ago

jenwachter commented 3 months ago

I am getting the following error when running npm install storybook-color-picker in a Storybook v8 project:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <MY_PROJECT>
npm ERR! Found: @storybook/blocks@8.1.4
npm ERR! node_modules/@storybook/blocks
npm ERR!   dev @storybook/blocks@"^8.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @storybook/blocks@"^7.0.0" from storybook-color-picker@4.0.0
npm ERR! node_modules/storybook-color-picker
npm ERR!   storybook-color-picker@"*" from the root project

It looks like the Storybook dependencies need to be upgraded to v8. I attempted to do this on a forked brach so I could make a pull request: https://github.com/johnshopkins/storybook-color-picker/tree/v8-deps

But then when I tried to compile using npm run build, I got the following error:

[0] npm run buildBabel exited with code 0
[1] src/utils/getColorControls/index.ts(14,30): error TS2339: Property 'type' does not exist on type 'Control'.
[1]   Property 'type' does not exist on type 'false'.
[1] src/utils/getColorControls/index.ts(21,64): error TS2339: Property 'type' does not exist on type 'Control'.
[1]   Property 'type' does not exist on type 'false'.
[1] npm run buildTsc exited with code 2

I wish I could get this to work so I could make that pull request, but I'm new to Storybook (and even newer to add-ons), so I'm not sure where to go from here to get the add-on working with Storybook v8.

adrianbielawski commented 3 months ago

Thanks for reporting the issue. I am going to work on Storybook v8 compatibility this week.