Debian 13 trixie

Angular 20 : インストール2025/09/12

 

Web アプリケーションフレームワーク Angular のインストールです。

[1]

こちらを参考に Node.js 22 をインストールしておきます

[2] Angular 20 をインストールします。
root@dlp:~#
npm install -g @angular/cli@20

.....
.....

added 348 packages in 11s

68 packages are looking for funding
  run `npm fund` for details
[3] 任意の一般ユーザーで動作確認します。
debian@dlp:~$
ng version


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/



Angular CLI: 20.3.1
Node: 22.19.0
Package Manager: npm 10.9.3
OS: linux x64


Angular: <error>

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.1 (cli-only)
@angular-devkit/core         20.3.1 (cli-only)
@angular-devkit/schematics   20.3.1 (cli-only)
@schematics/angular          20.3.1 (cli-only)

debian@dlp:~$
ng new hello-world

 Would you like to enable autocompletion? This will set up your terminal so
pressing TAB while typing Angular CLI commands will show possible options and
autocomplete arguments. (Enabling autocompletion will modify configuration files
 in your home directory.) Yes
Appended `source <(ng completion script)` to `/home/debian/.bashrc`. Restart your terminal or run the following to autocomplete `ng` commands:

    source <(ng completion script)

.....
.....

Packages installed successfully.
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
    Successfully initialized git.

debian@dlp:~$
cd hello-world

debian@dlp:~/hello-world$
ng serve --host dlp.srv.world --port 4200

Would you like to share pseudonymous usage data about this project with the
Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy.
For more
details and how to change this setting, see https://angular.dev/cli/analytics.

   No
Global setting: enabled
Local setting: disabled
Effective status: disabled

Warning: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues.

Initial chunk files | Names         | Raw size
main.js             | main          | 48.52 kB |
polyfills.js        | polyfills     | 95 bytes |
styles.css          | styles        | 95 bytes |

                    | Initial total | 48.71 kB

Application bundle generation complete. [1.662 seconds] - 2025-09-12T01:38:08.877Z

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
  →  Network: http://dlp.srv.world:4200/
  →  press h + enter to show help
[4] 任意のクライアントコンピューターで Web アクセスして、以下のようなページが表示されれば OK です。
関連コンテンツ