storybook-router
storybook-router copied to clipboard
yarn storybook-react-examples does not work out of the box
In order to run the current examples we have to also run yarn add -W storybook-react-router
I do have lerna installed, unlike #25
Which version are you using?
master as of 17 March 2020
Are you using storybook-router with a react based project or a vue one?
React examples
Please describe the problem:
Documentation does not match what you actually need to run the examples. Not sure if the problem is in the docs, or is in the actual project setup. I do have lerna installed as you can see from this:
mark@Marks-MacBook-Pro /tmp/storybook-router (master) $ yarn storybook-react-examples
yarn run v1.17.3
$ lerna exec --scope storybook-react-router-examples -- npm run storybook
lerna notice cli v3.16.4
lerna info versioning independent
lerna info filter [ 'storybook-react-router-examples' ]
lerna info Executing command in 1 package: "npm run storybook"
ERROR in ./Prompt.js
Module not found: Error: Can't resolve 'storybook-react-router' in '/private/tmp/storybook-router/examples/react-router'
@ ./Prompt.js 6:0-49 91:41-52
@ ./index.js
@ ./.storybook/config.js
@ multi /private/tmp/storybook-router/node_modules/@storybook/core/dist/server/common/polyfills.js /private/tmp/storybook-router/node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js /private/tmp/storybook-router/node_modules/webpack-hot-middleware/client.js?reload=true
...
Please explain how to reproduce the issue or (better) provide an example to do it.
git clone https://github.com/gvaldambrini/storybook-router.git
cd storybook-router/
yarn install && yarn bootstrap
yarn storybook-react-examples # This fails because storybook-react-router cannot be found
yarn add storybook-react-router # This fails because of the root check in yarn
yarn add -W storybook-react-router # This succeeds, but probably ruins the environment
yarn storybook-react-examples # Success