Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,037 16 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

Comienza con AppiumServiceBuilder y AppiumDriverLocalService utilizando las rutas de macOS proporcionadas, centrándote en cómo se resuelven el ejecutable de npm y PATH antes del inicio. Reproduce el fallo con el ejemplo mínimo y verifica que el servidor local de Appium se inicia correctamente y responde en 127.0.0.1:4723/status.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
1.3k
Forks
755
Merge medio
5 d 14 h
PR fusionados (30 d)
8

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de appium/java-client

Todos los issues de appium/java-client

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.