LoginSignup
1
0

More than 3 years have passed since last update.

Eclipse 2020-06 で、“Node.js version could not be determined” と言われる件

Posted at

Eclipse 2020-06 で、“Node.js version could not be determined”

対象バージョンのnodeはインストールして、パスも通っているのに、eclipse起動時に下記の画像のメッセージが出る

Eclipseのバージョン

Eclipse IDE for Enterprise Java Developers (includes Incubating components)

Version: 2020-06 (4.16.0)

nodeのバージョン

$ node -v
v10.17.0

OS

スクリーンショット 2020-08-19 10.58.57.png

メッセージ

image.png

原因としては

ユーザーが指定したPATH(.bash_profileとかの)を利用せずにMacOSでプログラムを起動する方法が原因で、PATH環境変数にノードの実行可能場所を追加することを説明するメッセージが表示されて混乱を引き起こしていると思われます。

解決策

cd /Applications/Eclipse_2020-06.app/Contents/Eclipse
echo -Dorg.eclipse.wildwebdeveloper.nodeJSLocation=$(which node) >> eclipse.ini
eclipse.ini
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1200.v20200508-1552
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.appendVmargs
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
-vmargs
-Djava.net.preferIPv4Stack=true
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Xdock:icon=../Resources/Eclipse.icns
-Xverify:none
-javaagent:../Eclipse/dropins/MergeDoc/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar
-javaagent:lombok.jar
-Dorg.eclipse.wildwebdeveloper.nodeJSLocation=/Users/ユーザー名/.nvm/versions/node/v10.17.0/bin/node

フルパスで無いとダメでした。

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