title: Appium: Exception: Invalid server instance exception has occured: There is no installed nodes
body: <p>I tried to start the appium server programmatically but encounter error. How to resolve this issues? I have nodejs installed and appium installed and environemnt variable set properly. I"m using maven appium java client 6.1.0 and selenium 3.14.0. Please help. A billion thanks for your help. </p>
  
  <p>Code: </p>
  
  <pre><code>try {
              File appDir = new File(System.getProperty("user.dir"));
              File app = new File(appDir, "..\\apk\\Flipkart.apk");
  
              // apk Capabilities
              DesiredCapabilities caps = new DesiredCapabilities();
              caps.setCapability("deviceName", "Sony Xperia Z2");
              caps.setCapability("BROWSER_NAME", "Android");
              caps.setCapability("platformVersion", "6.0");
              caps.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);
              //caps.setCapability("udid", "WUJ01N4RQ3"); // DeviceId from "adb devices" command
              caps.setCapability("platformName", "Android");
              caps.setCapability("app", app.getAbsolutePath());
              caps.setCapability("appPackage", "com.flipkart.android");
              caps.setCapability("appActivity","com.flipkart.android.SplashActivity");
  
              // Appium Capabilities
              caps.setCapability("skipUnlock","true");
              caps.setCapability("noReset","false");
  
              appiumBuilder = new AppiumServiceBuilder();
              appiumBuilder.withIPAddress("127.0.0.1");
              appiumBuilder.usingPort(47233);
              appiumBuilder.withCapabilities(caps);
              appiumBuilder.withStartUpTimeOut(3, TimeUnit.MINUTES);
              appiumBuilder.withLogFile(new File(System.getProperty("user.dir") + "\\log\\appium.log"));
              appiumBuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
              appiumBuilder.withArgument(GeneralServerFlag.LOG_LEVEL, "DEBUG");
              appiumBuilder.withArgument(GeneralServerFlag.ASYNC_TRACE, "true");
  
              appiumServer = AppiumDriverLocalService.buildService(appiumBuilder);
              appiumServer.start();
              //new URL("http://127.0.0.1:47233/wd/hub")
              driver = new AndroidDriver&lt;MobileElement&gt;(appiumServer, caps);
              driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
  
          } catch (Exception ex) {
              LogManager.logger.log(Level.INFO, "Exception: " + ex.getMessage());
          }
  </code></pre>
  
  <p>Error Log: </p>
  
  <blockquote>
    <p>INFO: Exception: Invalid server instance exception has occured: There
    is no installed nodes! Please install node via NPM
    (<a href="https://www.npmjs.com/package/appium#using-node-js" rel="noreferrer">https://www.npmjs.com/package/appium#using-node-js</a>) or download and
    install Appium app (<a href="http://appium.io/downloads.html" rel="noreferrer">http://appium.io/downloads.html</a>) Jan 03, 2019
    3:52:12 PM com.peterwkc.testManager.AndroidManager tearDown INFO:
    Exception: null</p>
  </blockquote>
  
  <p>EDIT: 
  I believe appium source code cannot detect my installation of nodejs and appium. </p>