SimeonC / storybook-xstate-addon

A storybook addon to assist with writing stories that rely on xstate
https://SimeonC.github.io/storybook-xstate-addon/
MIT License
54 stars 6 forks source link

Can't resolve 'react/jsx-runtime' in storybook-xstate-addon dist #27

Closed richpjames closed 2 years ago

richpjames commented 2 years ago

On attempting to run storybook I am presented with the following error after installing this addon for the first time:

ERROR in ./node_modules/storybook-xstate-addon/dist/preset/manager.js
[storybook] Module not found: Error: Can't resolve 'react/jsx-runtime' in '\node_modules\storybook-xstate-addon\dist\preset'

I am using react and react-dom version 16.2.0 and @storybook/react 6.2.9

Apologies if this an issue with my config and not the addon itself but I thought it was worth raising as this addon looks amazing and I really want to be able to use it

SimeonC commented 2 years ago

Hey, sorry for the issue report. I think this is related to #26 but I haven't had time to fix it yet.

SimeonC commented 2 years ago

Try the newly released v1.1.4 I moved all my deps to peer and dev so this should be resolved.

richpjames commented 2 years ago

Thanks for doing this @SimeonC. I think the change you made is the right thing to do but unfortunately I can't update as we are using v16.12 of React

SimeonC commented 2 years ago

Ahh, my bad 🤦 I meant to change this to match storybooks react peer deps which are "^16.8.0 || ^17.0.0" but completely forgot. New version v1.1.5 should allow you to use this with v16.12 (There shouldn't be any issues with swapping react 16 and 16 as far as I've seen so far)

richpjames commented 2 years ago

Ah awesome, thanks - I can install it again! However when running Storybook I get the same error that I got to begin with


Module not found: Error: Can't resolve 'react/jsx-runtime' in '..\node_modules\storybook-xstate-addon\dist\preset'