Launch Appium with Command Line - node.js

When I'm using Appium client, I checked the logs and the first command of this seems like C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --app C:\Users\IEUser\Desktop\Mobil\Applications\eribank.apk --app-activity .LoginActivity --app-pkg com.experitest.ExperiBank --device-ready-timeout 300 --platform-name Android --platform-version 18 --automation-name Appium --device-name "emulator-5554" --log-no-color. But I want to call this command from command line without Appium client. When I'm trying to 'node "C:\Program Files (x86)\Appium\node.exe lib\server\main.js" --address 127.0.0.1 --port 4723 --app "C:\Users\IEUser\Desktop\Mobil\Applications\eribank.apk" --app-activity .LoginActivity --app-pkg com.experitest.ExperiBank --device-ready-timeout 300 --platform-name Android --platform-version 18 --automation-name Appium --device-name "emulator-5554" --log-no-color', I got the
module.js:327
throw err;
^
Error: Cannot find module 'C:\Program Files (x86)\Appium\node.exe lib\server\main.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
There isn't file directory as "C:\Program Files (x86)\Appium\node.exe lib\server\main.js". How can I call appium server by command myself? Thanks.

I am not 100% sure and do not have access to my appium computer atm. I believe the issue is that you are trying to run a .exe file not the lib\server\main.js file. Meaning those paths should be separated.
Try running it as shown below:
"C:\Program Files (x86)\Appium\node.exe" lib\server\main.js <rest of commandline arguments>
Hope that solves your issue. Sorry I can't verify on my own setup.

If you try to run appium without arguments, it works?
"C:\Program Files (x86)\Appium\node.exe" lib\server\main.js
You will have to see default values and appium started
[info] [Appium] Welcome to Appium v1.7.0
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> GET /wd/hub/sessions {}
I don't know if it will work... But I think you are trying to run a different main.js... Default path for my appium-desktop v1.7.0 is
C:\Users\your_username\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\build\lib\main.js
Maybe if you try with absolute paths?
"C:\Program Files (x86)\Appium\node.exe" "C:\Users\your_username\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\build\lib\main.js"

Related

Ember build failed

I'm trying run an Ember project locally : https://github.com/cosmicjs/ember-real-estate-website?files=1. I'm using pycharm 2017 using git-bash as my terminal in win7. I have npm , node and ember installed . In pycharm my project looks like the screenshot.
After switching to the cosmic-real-estate folder:
$ ember build
Running without permission to symlink will degrade build performance.
See http://ember-cli.com/user-guide/#windows for details.
cleaning up...
Build failed.
The Broccoli Plugin: [Funnel: Funnel: index.html] failed with:
Error: EISDIR: illegal operation on a directory, symlink 'e:\ember-real-estate-website\cosmic-real-estate\app' -> 'e:\ember-real-estate-website\cosmic-real-estate\tmp\funnel-input_base_path-ZStiRJkX.tmp'
at Error (native)
at Object.fs.symlinkSync (fs.js:1069:18)
at symlinkWindows (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:123:18)
at symlinkOrCopySync (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:63:5)
at e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\read_compat.js:86:11
at tryCatch (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
The broccoli plugin was instantiated at:
at Funnel.Plugin (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\index.js:7:31)
at new Funnel (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-funnel\index.js:58:10)
at EmberApp._rawAppIndex (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:694:12)
at EmberApp.index (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:678:20)
at EmberApp.toArray (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1661:12)
at EmberApp.toTree (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1684:38)
at module.exports (e:\ember-real-estate-website\cosmic-real-estate\ember-cli-build.js:26:14)
at Builder.setupBroccoliBuilder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:56:19)
at new Builder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:30:10)
at BuildTask.run (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\tasks\build.js:15:19)
There is a new node_modules folder visible as well:
How can I get this working?

jsreport failing on looking up extensions

So I recently started working on a linux machine (ubuntu 16.04) and followed the installation instructions here http://jsreport.net/downloads/. When I run npm start --production I get
2016-09-13T16:51:57.134Z - info: Initializing jsreport in production mode using configuration file prod.config.json
2016-09-13T16:51:57.138Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-09-13T16:51:57.146Z - info: Searching for available extensions in /home/ross/rifiniti/optimo_ui/
2016-09-13T16:51:57.152Z - info: Extensions location cache not found, crawling directories
2016-09-13T16:51:57.317Z - error: Error occured during reporter init Error: ENOENT, no such file or directory '/home/ross/rifiniti/optimo_ui/ember/tmp/tree_merger-tmp_dest_dir-2yGnPLMA.tmp/optimo-ui/config'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:51:21
at Array.forEach (native)
at Object.exports.walkSync (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/extensions/locationCache.js:50:20
From previous event:
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:90:8
From previous event:
at Reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:69:30)
at Reporter.reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/ross/rifiniti/optimo_ui/server.js:1:85)
And I have no idea why. It was working fine on mac but now it is looking for this non-existent tmp file in ember. I'm at a loss, any help would be greatly appreciated!
SOLVED!
All I had to do was remove the tmp directory in ember and it worked.

Unable to run (gulp serve) Google Polymer Starter Kit v1.1.0 on Windows

I need help please!
I have been able to effortlessly install and run all previous versions of the PSK. I have spent hours now trying to get 1.1.0 to run in my environment. I have done everything I can think of. From googling the error to reviewing all current issues with this version here. Any of the suggested fixes dont work for me.
I have made no code changes and I am running CMD as the Admin.
When I grab a fresh copy of the repository and do the NPM & Bower installs, then run "gulp serve" I get the following error no matter what:
C:\FrontEnd\polymer-starter-kit>gulp serve
[09:45:33] Using gulpfile C:\FrontEnd\polymer-starter-kit\gulpfile.js
[09:45:33] Starting 'styles'...
[09:45:33] Starting 'elements'...
[09:45:33] Starting 'images'...
[09:45:33] Finished 'elements' after 249 ms
[09:45:33] styles all files 98 B
[09:45:33] Finished 'styles' after 590 ms
[09:45:34] images all files 35.41 kB
[09:45:34] Finished 'images' after 357 ms
[09:45:34] Starting 'serve'...
[09:45:34] Finished 'serve' after 73 ms
[PSK] Access URLs:
------------------------------------
Local: http://localhost:5000
External: http://xxx.xxx.x.x:5000
------------------------------------
UI: http://localhost:3001
UI External: http://xxx.xxx.x.x:3001
------------------------------------
[PSK] Serving files from: .tmp
[PSK] Serving files from: app
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
My Environment:
All Required Prerequisites
Windows 10
Node.js v4.1.1
NPM v3.3.4
Bower v1.5.3
I am also not sure how to get a more detailed stack trace.
What should I do?
Thanks for the help!
It turns out I needed to add C:\Windows\System32 to my PATH vars. So strange. When I did that everything work like a charm.

What is the issue "node" is working but "nodemon" is not woking on windows 7 64-bit in node.js?

I am new to node.js. node is working fine but when I installed the nodemon package, it gives an error: exception in nodemon killing node, even when installed globally.
22 Jun 13:07:29 - [nodemon] v1.3.7
22 Jun 13:07:29 - [nodemon] to restart at any time, enter `rs`
22 Jun 13:07:29 - [nodemon] watching: *.*
22 Jun 13:07:29 - [nodemon] starting `node server.js`
exception in nodemon killing node
Error: spawn cmd ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
----------------------------------------------------------
If appropriate, please file an error with the output from:
$ node
C:\Users\username\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.
js server.js --dump
At http://github.com/remy/nodemon/issues/new
Possible solutions.
1. Permissions
The problem may be in your file permissions. Execute in git bash or from windows to give full permission to the project folder.
$ chmod -R 777 [folder]
2. Environment Variables
Missing "C:\Windows\System32" in the PATH.
Github issue
3. Reinstall
Altogether remove nodemon using npm and try reinstalling.
npm uninstall -g nodemon
4. Update nodejs
If you have an old version of NodeJS, try updating it. I prefer entirely removing NodeJS and reinstalling it again.
Step by steps to remove NodeJS in windows
Note: Your question may not be rich enough to answer correctly. Please include more information about questions if those didn't work.
Help spawn to locate your nodemon.cmd like this:
var nodemonCmd = (process.platform == 'win32') ? 'node_modules\\.bin\\nodemon.cmd' : 'nodemon'
myApp = spawn(nodemonCmd, ['build/server.bundle']);
Hope it works :)

Nodeclipse + nodemon error

When I try to run an express app in nodeclipse, it gives me the error,
23 Jan 11:58:04 - [33m[nodemon] v1.0.13[39m
23 Jan 11:58:04 - [33m[nodemon] to restart at any time, enter rs[39m
23 Jan 11:58:04 - [33m[nodemon] watching: .[39m
23 Jan 11:58:04 - [32m[nodemon] starting node
/home/rdteam/workspace/NedvedNodeExpressTest/app.js[39m
[31m[nodemon] unable to run executable: "node"[39m
However, when I run from command line that
node /home/rdteam/workspace/NedvedNodeExpressTest/app.js
or
nodemon /home/rdteam/workspace/NedvedNodeExpressTest/app.js
both work without problem.
Pls help.
Regards
Hammer
In my case (running os x) I quick solved it setting the full path in :
/usr/local/lib/node_modules/nodemon/lib/monitor/run.js
function run(options) {
var cmd = config.command.raw;
//Added line
cmd.executable = '/usr/local/bin/node';
I was able to solve this problem by using the forever module, and configuring Nodeclipse's 'Node monitor path' to point to forever (*../npm/node_modules/forever/bin/forever*)
npm install forever
Open Eclipse -> Preferences -> Nodeclipse
Set the 'Node monitor path' to your installation of forever, and you're done.
I ran headlong into this problem whilst setting up Nodeclipse, and getting my node programs to work on Eclipse Kepler running on Mac OS X 10.8.5 (Mountain Lion)
The use case "Nodeclipse with nodemon":
Nodeclipse 0.9 Eclipse 4.2.2 Java 1.7 on win32
Configure Nodeclipse with monitor path C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js
logilog.js with console.log('done');
Run As -> Node with monitor
Produced command line (seen in Nodeclipse Console):
node --harmony C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js D:\Workspaces\ADT-Bundle\CountingServer\try\logilog.js
Console output
23 Jan 16:23:35 - [33m[nodemon] v0.7.10[0m
Error: ENOENT, no such file or directory 'D:\Workspaces\ADT-Bundle\CountingServer\try\undefined\nodemonCheckFsWatch1390465415226'
at Object.fs.openSync (fs.js:427:18)
at Object.watchFileChecker.check (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:154:22)
at ready (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:49:22)
at testAndStart (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:71:5)
at Object.<anonymous> (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:847:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
23 Jan 16:23:35 - [33m[nodemon] to restart at any time, enter `rs`[0m
23 Jan 16:23:35 - [32m[nodemon] watching: D:\Workspaces\ADT-Bundle\CountingServer\try[0m
23 Jan 16:23:35 - [nodemon] exception in nodemon killing node
Created issues #118 https://github.com/Nodeclipse/nodeclipse-1/issues/118
That is how issues are reported.
Thank you for letting know that you need this. Check http://www.nodeclipse.org/ on news and how to help.
If you create a nodemon.json config file in your application folder (e.g. /home/rdteam/workspace/NedvedNodeExpressTest/nodemon.json) with the following JSON it should work without having to modify the Nodemon source files.
{
"exec": "/usr/local/bin/node"
}
This work on OS X, you may need to change the path depending on where you have node installed.
Details on Nodemon config files:
https://github.com/remy/nodemon#config-files

Resources