|
2 | 2 |
|
3 | 3 | The [Nest CLI](https://github.com/nestjs/nest-cli) is a command-line interface tool that helps you to initialize, develop, and maintain your Nest applications. It assists in multiple ways, including scaffolding the project, serving it in development mode, and building and bundling the application for production distribution. It embodies best-practice architectural patterns to encourage well-structured apps.
|
4 | 4 |
|
5 |
| -#### Installation |
| 5 | +#### Requirements |
6 | 6 |
|
7 |
| -**Note**: In this guide we describe using [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install packages, including the Nest CLI. Other package managers may be used at your discretion. With npm, you have several options available for managing how your OS command line resolves the location of the `nest` CLI binary file. Here, we describe installing the `nest` binary globally using the `-g` option. This provides a measure of convenience, and is the approach we assume throughout the documentation. Note that installing **any** `npm` package globally leaves the responsibility of ensuring they're running the correct version up to the user. It also means that if you have different projects, each will run the **same** version of the CLI. A reasonable alternative is to use the [npx](https://github.com/npm/cli/blob/latest/docs/lib/content/commands/npx.md) program, built into the `npm` cli (or similar features with other package managers) to ensure that you run a **managed version** of the Nest CLI. We recommend you consult the [npx documentation](https://github.com/npm/cli/blob/latest/docs/lib/content/commands/npx.md) and/or your DevOps support staff for more information. |
| 7 | +Nest CLI requires a Node.js binary built with [internationalization support](https://nodejs.org/api/intl.html) (ICU), such as the official binaries from the [Node.js project page](https://nodejs.org/en/download). If you encounter errors related to ICU, check that your binary meets this requirement. |
| 8 | + |
| 9 | +```bash |
| 10 | +node -p process.versions.icu |
| 11 | +``` |
| 12 | + |
| 13 | +If the command prints `undefined`, your Node.js binary has no internationalization support. |
8 | 14 |
|
| 15 | +#### Installation |
9 | 16 |
|
| 17 | +**Note**: In this guide we describe using [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install packages, including the Nest CLI. Other package managers may be used at your discretion. With npm, you have several options available for managing how your OS command line resolves the location of the `nest` CLI binary file. Here, we describe installing the `nest` binary globally using the `-g` option. This provides a measure of convenience, and is the approach we assume throughout the documentation. Note that installing **any** `npm` package globally leaves the responsibility of ensuring they're running the correct version up to the user. It also means that if you have different projects, each will run the **same** version of the CLI. A reasonable alternative is to use the [npx](https://github.com/npm/cli/blob/latest/docs/lib/content/commands/npx.md) program, built into the `npm` cli (or similar features with other package managers) to ensure that you run a **managed version** of the Nest CLI. We recommend you consult the [npx documentation](https://github.com/npm/cli/blob/latest/docs/lib/content/commands/npx.md) and/or your DevOps support staff for more information. |
10 | 18 |
|
11 | 19 | Install the CLI globally using the `npm install -g` command (see the **Note** above for details about global installs).
|
12 | 20 |
|
13 | 21 | ```bash
|
14 | 22 | $ npm install -g @nestjs/cli
|
15 | 23 | ```
|
16 | 24 |
|
17 |
| -> info **Hint** Alternatively, you can use this command `npx @nestjs/cli@latest` without installing the cli globally. |
| 25 | +> info **Hint** Alternatively, you can use this command `npx @nestjs/cli@latest` without installing the cli globally. |
18 | 26 |
|
19 | 27 | #### Basic workflow
|
20 | 28 |
|
@@ -90,11 +98,11 @@ Run `nest <command> --help` for any of the following commands to see command-spe
|
90 | 98 |
|
91 | 99 | See [usage](/cli/usages) for detailed descriptions for each command.
|
92 | 100 |
|
93 |
| -| Command | Alias | Description | |
94 |
| -| ---------- | ----- | ----------------------------------------------------------------------------------------------------- | |
95 |
| -| `new` | `n` | Scaffolds a new _standard mode_ application with all boilerplate files needed to run. | |
96 |
| -| `generate` | `g` | Generates and/or modifies files based on a schematic. | |
97 |
| -| `build` | | Compiles an application or workspace into an output folder. | |
98 |
| -| `start` | | Compiles and runs an application (or default project in a workspace). | |
99 |
| -| `add` | | Imports a library that has been packaged as a **nest library**, running its install schematic. | |
100 |
| -| `info` | `i` | Displays information about installed nest packages and other helpful system info. | |
| 101 | +| Command | Alias | Description | |
| 102 | +| ---------- | ----- | ---------------------------------------------------------------------------------------------- | |
| 103 | +| `new` | `n` | Scaffolds a new _standard mode_ application with all boilerplate files needed to run. | |
| 104 | +| `generate` | `g` | Generates and/or modifies files based on a schematic. | |
| 105 | +| `build` | | Compiles an application or workspace into an output folder. | |
| 106 | +| `start` | | Compiles and runs an application (or default project in a workspace). | |
| 107 | +| `add` | | Imports a library that has been packaged as a **nest library**, running its install schematic. | |
| 108 | +| `info` | `i` | Displays information about installed nest packages and other helpful system info. | |
0 commit comments