You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make storybook truly useful it is necessary to be able to interact with a backend storage. That seems to be not really possible. The closest description i have found is a 4 year old issue: #208 which seems to not work anymore.
I am quite amazed how it is possible that this is not a built in feature and i don't understand why there is not a bigger demand for that feature.
I have the following in my .storybook/middleware.js:
however when i run npm run storybook i get this warning:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'indexOf' of undefined
at matchSingleStringPath (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/context-matcher.js:43:21)
at Object.match (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/context-matcher.js:12:16)
at HttpProxyMiddleware.shouldProxy (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:69:35)
at HttpProxyMiddleware.<anonymous> (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:27:22)
at Generator.next (<anonymous>)
at /Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:4:12)
at HttpProxyMiddleware.middleware (/Users/baba/projects/z-ui/frontend/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:26:47)
at _default (/Users/baba/projects/z-ui/frontend/node_modules/@storybook/core/dist/server/dev-server.js:152:3)
at buildDevStandalone (/Users/baba/projects/z-ui/frontend/node_modules/@storybook/core/dist/server/build-dev.js:343:38)
at async buildDev (/Users/baba/projects/z-ui/frontend/node_modules/@storybook/core/dist/server/build-dev.js:415:3)
(node:31019) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
And the proxying is not working i.e. when trying to access .e.g. stageResponse = await axios.post<StageRemote>("api/org/stage/create", {... via storybook, it tries to go directly to localhost:9009 where storybook is running instead of going to localhost:8000 which is where it should be proxied to.
Why is this not working, and what needs to be done to be able to proxy requests to the correct backend?
The text was updated successfully, but these errors were encountered:
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
To make storybook truly useful it is necessary to be able to interact with a backend storage. That seems to be not really possible. The closest description i have found is a 4 year old issue: #208 which seems to not work anymore.
I am quite amazed how it is possible that this is not a built in feature and i don't understand why there is not a bigger demand for that feature.
I have the following in my .storybook/middleware.js:
however when i run
npm run storybook
i get this warning:And the proxying is not working i.e. when trying to access .e.g.
stageResponse = await axios.post<StageRemote>("api/org/stage/create", {...
via storybook, it tries to go directly to localhost:9009 where storybook is running instead of going to localhost:8000 which is where it should be proxied to.Why is this not working, and what needs to be done to be able to proxy requests to the correct backend?
The text was updated successfully, but these errors were encountered: