Could not find node.js. This will result in editors missing key features.となった時の対応方法


事象1 : Eclipseを使っていたらMissing node.jsってダイアログが出た

原因 : Node.jsがインストールするされていないから

最近はEclipse使うのにNode.jsが必要なのか・・・

エラーメッセージ
Could not find node.js. This will result in editors missing key features. Please make sure node.js is installed and that your PATH environment variable contains the location to the 'node' executable.
(ざっくり訳)
Node.jsが見つかりませんでした。これにより、エディタに主要な機能がなくなります。Node.jsがインストールされPATHにが通っていることを確認してください。

対応1 : 見なかったことにする

  • 環境
    • Windows10 64bit バージョン1909
    • Eclipse IDE for Enterprise Java Developers Version: 2020-03 (4.15.0)

エディタの何かが使えなくなったらしいが、特に困ってないしNode.jsを使う開発でないし面倒くさいし・・・困ったときにインストールする

対応2 : Node.jsをインストールする

  • 環境
    • CentOS Linux release 7.8.2003 (Core)
    • Eclipse IDE for Enterprise Java Developers. Version: 2020-03 (4.15.0)

NodeSourceのGitHubのReadmeに書いてあるV10~13のいずれかのバージョンをインストールする

# リポジトリを追加する
$ curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
...省略...
## Run `sudo yum install -y nodejs` to install Node.js 14.x and npm.
## You may also need development tools to build native addons:
     sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
     sudo yum install yarn

# コマンドの指示に従ってyumでインストールする
$ sudo yum install -y nodejs
...省略...
Installed:
  nodejs.x86_64 2:14.7.0-1nodesource                                                                                                                                                                               

Complete!

# ちゃんとPATHも通ってめでたしめでたし
$ node -v
v14.7.0

事象2 : Node.js v14.7.0 is not supported.

原因 : インストールしたNode.jsのバージョンがサポート対象じゃないから

対応 : 見なかったことにする

面倒くさいからそのうち対応するけど今は見なかったことにする