What is the appium.js file location for starting appium via node on CentOS

I am trying to figure out the appium script path to pass to node to get it to run inside my java application.

In windows it would be:

public static String APPIUM_NODE_FILEPATH = “C:/Program Files (x86)/Appium/node.exe”;
public static String APPIUM_SERVERSCRIPT_FILEPATH = “C:/Program Files (x86)/Appium/node_modules/appium/bin/appium.js”;

In CentOS I can not find the /appium/bin/appium.js file (it’s not installed). Is something wrong with my installation or is there another file I should be passing to node.

I see node_modules/appium/build/lib/appium.js but this will give an error

localhost node_modules]$ /usr/bin/node /home/miw/node_modules/appium/lib/appium.js
/home/miw/node_modules/appium/lib/appium.js:1
(function (exports, require, module, __filename, __dirname) { import _ from ‘lodash’;
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions…js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:160:18)
at node.js:449:3

Make sure you’re trying to run the same script file. build/lib/appium.js is definitely different from lib/appium.js. One more thing: I’m running 1.5.2 on a CentOS machine, and the “main” script file is build/lib/main.js, not build/lib/appium.js.

Thank you very much.
I ended up installing globally so that I can just run it with “appium” in the end. We may need to adjust to specify the files in production though.

Thank you

Thank you very much.
I ended up installing globally so that I can just run it with “appium” in the end. We may need to adjust to specify the files in production though.

Thank you