WebStorm integrates with the Nx build system optimized for monorepos with built-in tooling for code scaffolding, module boundary enforcement, automated updates and advanced CI capabilities with caching and distribution.
WebStorm provides you with a dedicated Nx Console tool window and an Nx run/debug configuration for running and debugging your scripts.
If you are using Karma for testing, you can also specify the Nx package as Karma package in Karma run/debug configurations.
Click New Project on the Welcome screen or select File | New | Project from the main menu. The New Project dialog opens.
In the left-hand pane, choose Nx.
In the right-hand pane:
Specify the path to the folder where the project-related files will be stored.
In the Node Interpreter field, specify the Node.js interpreter to use. Select a configured interpreter from the list or choose Add to configure a new one.
From the Command list, select npx create-nx-workspace @latest.
Click Create and answer the questions in the wizard. Based on these answers, a workspace is created and set up.
Click the link to go to the authorization page.
Nx console tool window
The Nx Console tool window provides you with information about your workspace. It lists all your projects and the targets that can be run for them, such as build, serve, test, lint, and any configuration you have set up.
From the context menu of a target, you can run or debug the target as well as edit the dedicated run/debug configuration for it.
To open the Nx Console tool window, click
on the sidebar or go to View | Tool Windows | Nx Console on the main menu.
To view a list of the projects and targets shown, click Refresh Workspace or click on the toolbar of the tool window.
Run and debug Nx targets
You can run and debug Nx targets from the Nx Console tool window or via a dedicated Nx run/debug configuration.
Run targets
In the Nx Console tool window, select a target and then select Run '<target_name>' from its context menu.
From the Run widget on the toolbar, select the configuration with the name of the target and click next to it.
Debug targets
Set the breakpoints in your script where necessary.
In the Nx Console tool window, select a target and then select Debug '<target_name>' from its context menu.
Alternatively, from the Run widget on the toolbar, select the configuration with the name of the target and click next to it.
Edit run/debug configurations for targets
Do one of the following:
In the Nx Console tool window, select a target and then select Edit '<target_name> from its context menu.
From the Run widget on the main toolbar, select Edit Configurations, and then select the appropriate configuration from the list.
The Edit run/debug configuration: <target name> dialog opens.
Update the default auto-generated settings and save the run/debug configuration.
Thanks for your feedback!
Was this page helpful?
Cookie Settings
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.