0

I've found other threads on this, but none of the solutions have worked for me. I'm getting the error below when trying to start Appium using AppiumServiceBuilder()

Error: OpenQA.Selenium.Appium.Service.Exceptions.InvalidServerInstanceException: 'Invalid server instance exception has occurred: There is no installed nodes! Please install node via NPM (https://www.npmjs.com/package/appium#using-node-js) or download and install Appium app (http://appium.io/downloads.html)'

I'm initializing the AppiumLocalService like this:

Public AppiumLocalService appiumLocalService = AppiumServiceBuilder().Build();

It fails on that same line

  • I've confirmed that nodejs is installed
  • I've added the nodejs path to the Path environment variable
  • I've confirmed that Appium is installed (via NPM)
  • I'm able to start Appium from CMD
  • The same code runs on another Windows machine, so it must be something related to setup?

Expected: The Appium service should start

Chris R.
  • 11
  • 1

1 Answers1

0

You can also specify the path to the Node.js executable, the Appium JavaScript file, and other options as shown in below

    AppiumDriverLocalService service = AppiumDriverLocalService.buildService(
                        new AppiumServiceBuilder()
                        .usingDriverExecutable(new File("/usr/local/bin/node"))
                        .withAppiumJS(new File("/usr/local/lib/node_modules/appium/build/lib/main.js"))
                        .withLogFile(new File("/path/to/Documents/logs.txt"))  // Change to the absolute path
                        .withArgument(GeneralServerFlag.LOCAL_TIMEZONE));