Nx is a powerful open-source build system for monorepos, enabling development teams to build, test, and deploy applications faster. It provides advanced features like a project graph, computation caching, and task orchestration, making it ideal for large-scale, multi-project environments. The current stable version is 22.6.5, with frequent updates and beta releases leading up to new minor/major versions, ensuring continuous improvement and support for the latest web technologies.
npm install nxNo compatibility data collected yet for this library.
Initializes a new Nx workspace, creates a React application, visualizes the project graph, serves the application, and runs its tests.
Run `nx migrate latest` and follow the prompts to automatically update dependencies and apply necessary code transformations. Review the migration guide for manual steps.
Check the official Nx documentation for the recommended Node.js version for your Nx release and upgrade using a tool like `nvm` (e.g., `nvm install 18 && nvm use 18`).
Clear the Nx computation cache by running `nx reset` or `nx clear-cache` to force a fresh recomputation of tasks.
Ensure all required peer dependencies are installed in your workspace. For `@swc/core` and `@swc-node/register`, run `npm install --save-dev @swc/core @swc-node/register` or `yarn add --dev @swc/core @swc-node/register`.
Carefully configure `implicitDependencies` and `namedInputs` in your `nx.json` or `project.json` files to ensure all relevant file changes trigger correct task re-execution and caching.
Scroll up in your terminal to examine the detailed error messages preceding the 'NX command failed' output for the specific cause (e.g., TypeScript error, missing dependency, linter violation).
Install `@swc/core` as a development dependency: `npm install --save-dev @swc/core @swc-node/register` or `yarn add --dev @swc/core @swc-node/register`.
Verify the correct project name by running `nx graph` or checking the relevant `project.json` file. Correct the command with the accurate project name.
Upgrade Node.js to the version recommended by Nx (e.g., using `nvm install 18` and `nvm use 18`) or adjust your project's `.nvmrc` file.
In your `nx.json` or `project.json`, ensure the target's configuration includes `cache: true` and appropriate `inputs` and `outputs`. For example, `"targetDefaults": { "build": { "cache": true, "inputs": ["default", "^default"], "outputs": ["{projectRoot}/dist"] } }`.No dependency data recorded yet.