LoginSignup
1
1

Ubuntu 22.04 に node v18 をインストールする

Posted at

とある ubuntuベースのコンテナで nodejs とか npm とかを使おうとして単純に apt install nodejs したらその後 npm パッケージのインストールで deprecate 警告が出まくって何事かと思った。

デフォルトのリポジトリでは node v12 とかやたら古いものが入ってるのでv18 を使えるようにリポジトリを更新してからインストールしなければならない。

curl -fsSL https://deb.nodesource.com/setup_18.x | bash - 
# バージョンとか確認する
sudo apt show nodejs 
apt-get install -y nodejs

yarn もデフォルトだと古すぎて最近の symfony 開発だとはまってしまうし、なんだかなあって感じ。

1
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
1
1