3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

bash: npm: command not found

Last updated at Posted at 2025-04-12

環境

バージョン
Docker 27.1.2
Ubuntu 22.04

bash: npm: command not foundの原因

npmがインストールされていない

npm install

bash: npm: command not found

Ubuntuはaptをつけて実行

Dockerコンテナ内に入って実行

# パッケージリストの更新
apt update

# パッケージをインストール
apt install nodejs npm

バージョン確認

バージョンが返ってくればOK

npm -v
# 9.2.0

node -v
# v18.19.1

aptコマンドとは

Linuxにおけるパッケージ管理用のコマンドで、Debian系のディストリビューションに使われています。

インストール参考サイト

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?