Closed rhuanbarreto closed 2 years ago
@ndelangen Thanks for your input, I actually had both in my package.json, I had to remove node_modules and re-install and it worked!
Thanks @shilman for the quick fix for this
hi. i have upgraded storybook to https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.32 (issue with react-router 6 in other projects) After the upgrade, i have a problem with build-storybook. error: Field 'browser' doesn't contain a valid alias configuration storybook
node_modules/@storybook/theming/dist/cjs doesn't include any files. Does anyone have a similar issue?
Hi, I just update to the new storybook 6.4.19 I still using React-router-dom 5 in my app and look like its try to use react-router 6 because storybook and my CRA is getting this error
Uncaught TypeError: Cannot read properties of undefined (reading 'pathname')
at Router (index.tsx:284)
at renderWithHooks (react-dom.development.js:14985)
at mountIndeterminateComponent (react-dom.development.js:17811)
at beginWork (react-dom.development.js:19049)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)
at beginWork$1 (react-dom.development.js:23964)
at performUnitOfWork (react-dom.development.js:22776)
at workLoopSync (react-dom.development.js:22707)
at renderRootSync (react-dom.development.js:22670)
at performSyncWorkOnRoot (react-dom.development.js:22293)
at react-dom.development.js:11327
at unstable_runWithPriority (scheduler.development.js:468)
at runWithPriority$1 (react-dom.development.js:11276)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322)
at flushSyncCallbackQueue (react-dom.development.js:11309)
at scheduleUpdateOnFiber (react-dom.development.js:21893)
at Object.enqueueSetState (react-dom.development.js:12467)
at PersistGate.push.../../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:365)
at react.js:61
at Object.dispatch (redux.js:297)
at Object.rehydrate (persistStore.js:79)
at _rehydrate (persistReducer.js:61)
at persistReducer.js:90
The same occurs even after upgrading to 6.5.0-beta.1
@nirapx do you have a reproduction you can share?
@shilman 6.4.22 https://codesandbox.io/s/elegant-butterfly-i68jhp 6.5.0-beta.1 https://codesandbox.io/s/cranky-platform-m4bjy3
any updates?
@nirapx when I remove the storybook dependencies & node_modules & lockfile and reinstall I get the same errors, so I don't think the problem is Storybook-related
for some reason, after upgrading to the stable 6.5 version and removing lockfile, and reinstalling it worked for me. thank you :)
As storybook v6.4 brings react-router v6, people using v5 face breaking changes for a minor version update of storybook, which breaks semver.
Temporary solution is changing the version to
~6.3.12
instead of^6.13.12
in the package.json file and putting"@storybook/router": "~6.3.10",
in the resolution parameter of the package.jsonAnd this breaking change is due to the
storybook-addon-outline
referenced in@storybook/addons-essentials
. Follow theyarn why command
. This package doesn't follow the fixed version nature of other storybook packages.