whitespace-se / storybook-addon-html

A Storybook addon that extracts and displays compiled syntax-highlighted HTML
Other
95 stars 44 forks source link

Error when trying to install #84

Closed JordanMed closed 1 year ago

JordanMed commented 1 year ago

I am running a Vue 3 project on storybook.js

I tried to install using the following but am receiving an error ERESOLVE unable to resolve dependency tree

npm i --save-dev @whitespace/storybook-addon-html prettier react-syntax-highlighter

I ended up running this command to get it to install

npm i --save-dev @whitespace/storybook-addon-html prettier react-syntax-highlighter --legacy-peer-deps 

now when i try and run storybook i'm getting another error Error: Cannot find module 'react/package.json'

Just wondering if this is something on my end and if anyone has any ideas on how i can fix it.

Thanks.

node v16.15.1 npm 8.15.0

dgonzalezr commented 1 year ago

I have a similar issue and it seems that in the peer dependencies we have:

"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",

Meaning that those having react ^18 will end up having a `not resolve dependency error.

CleanShot 2022-12-13 at 15 45 21@2x

cc. @jeanfredrik

jeanfredrik commented 1 year ago

Thanks for spotting this! It should be fixed in 5.1.1 now.