# Unable to find node.exe and main.js file to start appium hence unable to start appium programatically

**URL:** <https://discuss.appium.io/t/unable-to-find-node-exe-and-main-js-file-to-start-appium-hence-unable-to-start-appium-programatically/17089>\
**Category:** Issues/Bugs\
**Created:** [June 6, 2017, 6:29pm UTC](https://discuss.appium.io/t/unable-to-find-node-exe-and-main-js-file-to-start-appium-hence-unable-to-start-appium-programatically/17089 "2017-06-06T18:29:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![suri.kiran](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@suri.kiran](https://discuss.appium.io/u/suri.kiran)\
**Post date:** [June 6, 2017, 6:29pm UTC](https://discuss.appium.io/t/unable-to-find-node-exe-and-main-js-file-to-start-appium-hence-unable-to-start-appium-programatically/17089/1 "2017-06-06T18:29:14Z")

</div>

I am trying to start appium programatically I installed appium through npm using the below command  
npm install -g appium  
before this I installed nodejs too. Previously when I used to install appium it gets installed in C drive of my machine but now surprisingly it’s taking C:/User/UserName/AppData/Roaming/npm/appium… where I am not able to find node.exe as it used to come within the Appium folder only but unable to find it. I wrote a Java program to start appium programatically as below:-

return service = AppiumDriverLocalService.buildService ( new AppiumServiceBuilder ( )  
.usingDriverExecutable ( new File (  
“C:\Program Files\nodejs\node.exe” ) )  
.withAppiumJS ( new File (  
“C:\Users\UserName\AppData\Roaming\npm\node\_modules\appium\build\lib\main.js”) )  
.usingPort ( port )  
.withArgument ( GeneralServerFlag.LOG\_LEVEL ,  
“debug” ) ) ;  
service.start();

surprisingly the appium is not starting and not even a single error shown to identify the exact issue (which is really breaking my head). I tried to start manually with the same path for node and appium which I provided above which got started successfully but not happening when trying programatically. I can proceed by starting it manually but not interested to do so hence thought of doing it programatically which I am unable achieve hence please provide some solution as I am really panic to solve this since 1 week

Environment:-  
Appium 1.6.5  
Node v6.10.3  
Java (JRE) 1.8.0\_131  
OS : Windows 10  
gson-2.8.0  
java-client-5.0.0-BETA8

Strange thing is appium itself not happening hence request for a help. This worked well in previous versions of Java but in latest version getting failed

---

<div class="post-metadata">

**Author:** ![jene\_ahuja](https://discuss.appium.io/user_avatar/discuss.appium.io/jene_ahuja/32/8893_2.png) [@jene\_ahuja](https://discuss.appium.io/u/jene_ahuja)\
**Post date:** [May 26, 2021, 9:13am UTC](https://discuss.appium.io/t/unable-to-find-node-exe-and-main-js-file-to-start-appium-hence-unable-to-start-appium-programatically/17089/2 "2021-05-26T09:13:40Z")

</div>

please help  
unable to find node.exe file while installing appium through node
