npmappiumnpm-installmacos-mojave

"Appium &" won't start Appium server in mac


I have downloaded all the required tools and also able to set up environment variable in the system. macOS mojave : version 10.14.3

I have install node, appium and wd:

brew install node
npm install -g appium
npm install wd

when i try yo start appium server using appium & I got following error;

[1] 49460

-bash: appium: command not found

[1]+ Exit 127 appium

Updated:

None of app opens which is installed using npm command. The app installed using npm shows command not found error

It was working fine in macOs Mojave 10.14.2

Logs while using npm install -g appium

$npm install -g appium
npm WARN deprecated fsevents@2.0.1: Not Ready For Production
/Users/infotmt/bin/appium -> /Users/infotmt/lib/node_modules/appium/build/lib/main.js

> appium-chromedriver@4.9.0 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

[18:22:48] [Chromedriver Install] Installing Chromedriver version '2.44' for platform 'mac' and architecture '64'
[18:22:48] [Chromedriver Install] Opening temp file to write 'chromedriver_mac64' to...
[18:22:48] [Chromedriver Install] Opened temp file '/var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip'
[18:22:48] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/2.44/chromedriver_mac64.zip...
[18:22:52] [Chromedriver Install] Writing binary content to /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip...
[18:22:52] [Chromedriver Install] Extracting /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip to /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64
[18:22:52] [Chromedriver Install] Creating /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac...
[18:22:52] [Chromedriver Install] Copying unzipped binary, reading from /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64/chromedriver...
[18:22:52] [Chromedriver Install] Writing to /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver...
[18:22:52] [Chromedriver Install] /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place

> appium-selendroid-driver@1.13.2 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver
> node ./bin/install.js

[18:22:54] Java version 1.8.0_202 found
[18:22:55] Ensuring /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists
[18:22:55] Downloading Selendroid standalone server version 0.17.0 from https://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar
[18:23:07] Writing binary content to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp
[18:23:07] Selendroid standalone server downloaded
[18:23:07] Determining AndroidManifest location
[18:23:07] Determining server apk location
[18:23:07] Extracting manifest and apk to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download
[18:23:07] Copying manifest and apk to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid
[18:23:07] Cleaning up temp files
[18:23:07] Fixing AndroidManifest icon bug

> appium-windows-driver@1.5.1 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-windows-driver
> node install-npm.js

Not installing WinAppDriver since did not detect a Windows system

> fsevents@2.0.1 install /Users/infotmt/lib/node_modules/appium/node_modules/fsevents
> [ -f fsevents.node ] || npm run prepare


> heapdump@0.3.12 install /Users/infotmt/lib/node_modules/appium/node_modules/heapdump
> node-gyp rebuild

  CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from ../src/heapdump.cc:17:
../../nan/nan.h:1064:44: warning: 'ToString' is deprecated: Use maybe version
      [-Wdeprecated-declarations]
      v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                           ^
/Users/infotmt/.node-gyp/11.7.0/include/node/v8.h:2537:3: note: 'ToString' has
      been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/infotmt/.node-gyp/11.7.0/include/node/v8config.h:326:29: note: expanded
      from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
1 warning generated.
  SOLINK_MODULE(target) Release/addon.node
+ appium@1.10.1
added 493 packages from 406 contributors and updated 2 packages in 34.024s

Solution

  • The problem is that i installed the node/npm in very old version of mac. Then i upgraded the mac version to mojave. I solve the issue by factory resetting the mac and then updating it to latest version. After that i install node/npm and then appium. It works fine now.