Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug: Can't start Appium server through code - getting 'npm' executable is not found when even though npm is there

オープン
#2,037 コメント 16 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java

調査の方向性

提供された macOS パスを使用して AppiumServiceBuilder と AppiumDriverLocalService から始め、起動前に npm 実行可能ファイルと PATH がどのように解決されるかに焦点を当てます。最小限の例で失敗を再現し、ローカル Appium サーバーが正常に起動し、127.0.0.1:4723/status で応答することを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug
Do I have the most recent component updates?
  • I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
  • I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

I wanted to upgrade from Appium 1.x to Appium 2.x+ but have been facing an issue when trying to run the appium server from the code. I get this error before it times out: [Appium] 'npm' executable is not found neither in the process working folder (/Users/[user]/Projects/povio-automated-qa) nor in any folders specified in the PATH environment variable (/usr/bin:/bin:/usr/sbin:/sbin). After Timeout I get this:

[The local appium server has not been started, Reason: Timed out waiting for [http://127.0.0.1:4723/status] to be available 
after 20003 ms, Consider increasing the server startup timeout value (currently 20000ms), Node.js executable path: 
/usr/local/bin/node, Arguments: [/opt/homebrew/bin/appium, --port, 4723, --address, 127.0.0.1, --log, 
/Users/[user]/Projects/povio-automated-qa/target/resources/appium_server_logs1, --session-override], Output: [Appium] 
'npm' executable is not found neither in the process working folder (/Users/mmeholli/Projects/povio-automated-qa) nor in any 
folders specified in the PATH environment variable (/usr/bin:/bin:/usr/sbin:/sbin)
]

I have tried increasing the timeout, upgrading and downgrading appium, selenium, java, node, and have checked environmental variables for any potential fix, but nothing works.

This is the current code that I'm working with:

AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder();
        appiumServiceBuilder.usingPort(PORT)
                .withIPAddress("127.0.0.1")
                .withAppiumJS(new File("/opt/homebrew/bin/appium"))
                .usingDriverExecutable(new File("/usr/local/bin/npm"))
                .withArgument(GeneralServerFlag.SESSION_OVERRIDE)
                .withLogFile(new File(System.getProperty("user.dir") + "/target/resources/appium_server_logs" + Thread.currentThread().getId()));
        service = AppiumDriverLocalService.buildService(appiumServiceBuilder);
        service.start();

I am using:
Appium 2.0.1
java-client 8.6.0
Selenium 4.9.1

Expected Behavior

I am expecting the appium server to start from the code

Minimal Reproducible Example
AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder();
        appiumServiceBuilder.usingPort(PORT)
                .withIPAddress("127.0.0.1")
                .withAppiumJS(new File("/opt/homebrew/bin/appium"))
                .usingDriverExecutable(new File("/usr/local/bin/npm"))
                .withArgument(GeneralServerFlag.SESSION_OVERRIDE)
                .withLogFile(new File(System.getProperty("user.dir") + "/target/resources/appium_server_logs" + Thread.currentThread().getId()));
        service = AppiumDriverLocalService.buildService(appiumServiceBuilder);
        service.start();
Environment
Link to Appium Logs

No response

Further Information

No response

主要言語
Java
スター
1.3k
フォーク
755
平均マージ
5日 14時間
マージ済み PR(30日)
8

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

appium/java-client のほかの issue

appium/java-client の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。