0
votes

While running the appium server on windows 8 i am getting the error message as:

module.js:340 > throw err; > ^ > Error: Cannot find module 'C:\Program Files (x86)\Appium\node_modules\appium\lib\server\main.js' > at Function.Module._resolveFilename (module.js:338:15) > at Function.Module._load (module.js:280:25) > at Function.Module.runMain (module.js:497:10) > at startup (node.js:119:16) > at node.js:902:3 >

2
In your C:\Program Files (x86)\Appium\node_modules\appium\lib\server\ folder do you have a main.js file? - Lajos Arpad
i was unable to find main.js. - Purnima
I have installed the appium from bitbucket.org/appium/appium.app/downloads website and AppiumForWindows_1_4_0_0.zip this file. - Purnima
The problem is that module.js expects a main.js to exist (you are running the main module) and it is not found in the expected location - Lajos Arpad

2 Answers

1
votes

This could be due to improper installation. Use the below link to download and install latest appium

https://bitbucket.org/appium/appium.app/downloads/AppiumForWindows_1_4_16_1.zip

Let me know if issue persists

1
votes

You Should build the Project to get your main.js...

Go to Appium folder and invoke ./reset.sh to build your node project

Recommended:

Clone the appium project from GITHUB and build your node project like i mentioned above. So, you can update easily to the very latest update of appium