Storybook: different port for each module
See original GitHub issuePrerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- I am running the latest version
- I checked the documentation (nx.dev) and found no answer
- I checked to make sure that this issue has not already been filed
- I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)
Expected Behavior
It would be nice to be able to run Cypress e2e tests in parallel against different libraries configured with Storybook.
Current Behavior
What is the current behavior?
Errors about ports already being used when executing npm run affected:e2e -- --headless --base=remotes/origin/master --head=HEAD --parallel
My current workaround is to manually change the port for each project through angular.json and cypress.json so that there are no port conflicts
Apparently, the issue also happens without running in parallel.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- Create a workspace with multiple libraries
- Configure Storybook for each lib
- Execute the above command
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Configure Storybook
Storybook is configured via a folder called .storybook , which contains various configuration files. Note that you can change the folder that Storybook...
Read more >Storybook Composition
View multiple Storybooks with different tech stacks in one place ... if you have a React Storybook and an Angular Storybook running on...
Read more >CLI options - Storybook
-p , --port [number], Port to run Storybook ... If you're using npm instead of yarn to publish Storybook, the commands work slightly...
Read more >Environment variables - Storybook - JS.ORG
You can use environment variables in Storybook to change its behavior in different “modes”. If you supply an environment variable prefixed with STORYBOOK_ ......
Read more >Install Storybook
... an Angular Workspace; Create React App; Create a Vue App; Ember CLI; Or any other tooling available. ... If all else fails,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This fails for me even when not running in parallel. I have a project with multiple libs all of which are configured by default to run on port
4400
. When I runThe next storybook instance picks the next available port e.g
4401
but it still waits for the iframe to popup on4400
which is busy with another storybook instance. I tried explicitly specifying the port on the e2e project config insideangular.json
, but on launch it errors saying I can’t specify the port there.We are experiencing a similar issue, probably the same.
Reproduction can be found here:
https://github.com/elisa-dc/test-storybook
Steps to reproduce:
credits to @elisa-dc