# Avoiding Port Conflicts with Multiple Storybook Instances

DevFeed: [Avoiding Port Conflicts with Multiple Storybook Instances](<https://devfeed.tech/articles/avoiding-port-conflicts-with-multiple-storybook-instances-21401.md>)

Original publisher: [Read original article](<https://nx.dev/blog/dynamic-targets-with-inference-tasks>)

Author: Nicolas Beaussart

Published: 2024-12-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Storybook](<https://devfeed.tech/topics/storybook.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [inference](<https://devfeed.tech/tags/inference.md>), [monorepo](<https://devfeed.tech/tags/monorepo.md>), [nx](<https://devfeed.tech/tags/nx.md>), [port](<https://devfeed.tech/tags/port.md>), [storybook](<https://devfeed.tech/tags/storybook.md>), [tooling](<https://devfeed.tech/tags/tooling.md>)

## AI overview

This tutorial explains how to use Nx task inference and the createNodes feature to generate Storybook targets with unique ports for projects in a monorepo. The approach is intended to prevent port conflicts when multiple Storybook instances run in parallel, including in CI environments.

## Source excerpt

Use Nx's task inference to automatically assign unique ports to Storybook instances, preventing conflicts in your monorepo.