"appium &" won't start appium server in mac - npm

I have downloaded all the required tools and able to set up environment variable.
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

My advice is as follows:
1. Do not use Homebrew to install Node.js.
The best way to do this is to use the nvm version manager. I had many conflicts with Node.js on MacOS, but nvm is a bulletproof solution.
https://yoember.com/nodejs/the-best-way-to-install-node-js/
2. It is also highly recommended to use version managers for
Ruby https://github.com/rbenv/rbenv
Python https://github.com/pyenv/pyenv
Java http://www.jenv.be/
Version managers take over Node/Ruby/Python/Java management from the system and allow you to install parallel versions and keep consistency of modules/packages/gems etc.
3. Then install the following packages:
npm install -g appium
npm install -g appium-doctor
After that you can check the list of all Appium dependencies:
appium-doctor --ios
appium-doctor --android
Follow the instructions and complete the list.
4. Never install modules/packages/gems... with sudo.

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.

Are you able to start appium server using desktop client?
https://github.com/appium/appium-desktop/releases/tag/v1.10.0
Also did you refer this https://github.com/appium/appium/issues/6738?

Check your $PATH environment variable for existence of /Users/infotmt/bin.

Try installing the desktop version from releases: https://github.com/appium/appium-desktop
Did you try to install appium-doctor?
Try running npm install -g appium-doctor as kubano tolds you. I'm currently using it in mojave, so feel free to ask me anything

try installing appium using brew brew install appium it will install the appium server on local under user
Thanks!

Related

error installing cypress on windows 64 with npm

I'm seeing an error when attempting to install the latest cypress on my Windows 10 machine. I was using cypress 8.7 just fine. I deleted node_modules and package-lock.json and removed "cypress": "^8.7.0", from package.json.
Now installing cypress (9.1) I see this error:
npm install --save-dev cypress
npm ERR! Error: Cannot find module 'har-validator'
I see the same error when trying to use the old version too
npm install --save-dev cypress#8.7.0
System info from powershell:
node -v
> v16.8.0
npm -v
> 7.21.0
UPDATE:
My friend is able to install with dependency 8.7.0 in package.json, on OSX with nodejs 14.16.0.
This works today (2021-11-26) for me
npm install --save-dev cypress#8.7.0
There is a Bug in #cypress/request.
Take a look at https://github.com/cypress-io/request/pull/15
EDIT: There is a PR from one of the devs. https://github.com/cypress-io/request/pull/16
Looks like Cypress issue with latest versions. we have this problem for v8.7.0 today. "npm install har-validator" manually installed the missing har-validator module, that helped.

How to install appium thru npm at offline machine

I have installed nodejs with npm, appium guhub package.
My machine does not has Internet connection
How do I use npm to install the appium?
Npm install -g appium
Is not working.
Try with this steps
Create package.json file using npm-init command
list all the modules in package.json that you need
Run npm-install on your terminal
full reference : https://docs.npmjs.com/cli/v7/configuring-npm/package-json

electron install error : Generated checksum for "electron-v2.0.2-win32-x64.zip" did not match expected checksum

I want to install latest electron version in my existing angular application.So I followed npm command to install it.
Command : npm i electron#latest
Expected Behavior
Electron should installed successfully.
Actual Behavior
So, Whenever I tried to install electron, after downloading zip file and SAMSUN.txt file , it is throwing below error....
Error: Generated checksum for "electron-v2.0.2-win32-x64.zip" did not match expected checksum.
at ChecksumMismatchError.ErrorWithFilename (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:41:124)
at new ChecksumMismatchError (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:56:133)
at Hash. (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:203:22)
at emitNone (events.js:106:13)
at Hash.emit (events.js:208:7)
at emitReadable_ (_stream_readable.js:513:10)
at emitReadable (_stream_readable.js:507:7)
at addChunk (_stream_readable.js:274:7)
at readableAddChunk (_stream_readable.js:250:11)
at Hash.Readable.push (_stream_readable.js:208:10)
Please note that I have tried to clear my npm cache using npm cache clean --force command and tried to install. but it didn't work.
I also tried to install electron globally using npm i -g electron#latest, but that approach also didn't work.
Please provide solution as soon as possible because I m really stuck at this problem.
Electron Version: 2.0.2
Operating System : windows
node version : 8.11.2
npm version : 6.1.0
Last known working Electron version:
We can solve this issue by using following steps (OS - Windows 10)
Delete "SHASUMS256.txt-x.x.xx" file from "C:\Users{{UserName}}.electron".
Delete Cache folder from "C:\Users{{UserName}}\AppData\Local\electron".
Delete electron from node_modules folder.
Then install electron globally and locally by using following commands -
npm init -y //Note: The -y flag provides default options automatically
npm install electron -g //install electron globally
npm install electron --save-dev --save-exact //install electron as devdependencies
If you are using typescript then install it as global using below command-
npm install -g typescript
Above steps may help you.

npm can't find in my cmd after I install using nvm

I install npm using nvm by doing 'nvm install 6.11.2'. It said the installation is successful. But when I execute 'npm' in my prompt. It said command not found.
Where does nvm install npm? so that i can update the path for cmd.
C:\Users\john>nvm install 6.11.2
Downloading node.js version 6.11.2 (64-bit)...
Complete
Creating C:\Users\john\AppData\Roaming\nvm\temp
Downloading npm version 3.10.10... Complete
Installing npm v3.10.10...
Installation complete. If you want to use this version, type
nvm use 6.11.2
C:\Users\john> npm
'npm' is not recognized as an internal or external command,
operable program or batch file.
For nvm version 1.1.7
Usage:
nvm on : Enable node.js version management.
nvm off : Disable node.js version management.
Try nvm on .
You need to open a new command prompt to pick up the new environment variables.

React Native - run-ios - React Packager process fails due to thinking I am running io.js version 1.6.2

I am attempting to start developing my first ever React Native application. I've installed the react-native-cli and ran the command react-native ios-run. The build is successful, and the simulator seems to boot up fine. However, a second terminal appears with the following message:
You are currently running io.js v1.6.2.
React Native runs on Node 4.0 or newer. There are several ways to
upgrade Node.js depending on your preference.
nvm: nvm install node && nvm alias default node
Homebrew: brew unlink iojs; brew install node
Installer: download the Mac .pkg from https://nodejs.org/
About Node.js: https://nodejs.org Follow along at: https://github.com/facebook/react-native/issues/2545
~
Process terminated. Press to close the window
I have tried:
uninstalling and reinstalling node via Homebrew.
node -v = 7.3.0
brew unlink iojs
Error: No such keg: /usr/local/Cellar/iojs
nvm install node && nvm alias default node
doesn't change anything.
navigated to /usr/local/bin and uninstalled iojs
iojs -v
-bash: iojs: command not found
brew update: no changes to formulae
brew doctor: nothing besides usual warnings
brew prune: nothing
brew cask uninstall iojs
Error: iojs is not installed
Help is appreciated here. I am at a loss to understand how I can be running io.js v1.6.2 when I'm pretty certain iojs is not installed on my machine. But perhaps I am missing something...cheers.
Finally got it. Uninstalled all versions of node / deleted any node or node_modules folders from /usr/local/lib/.
Also nvm uninstall iojs --force.
Downloaded node from https://nodejs.org/en/download/​. After all that, it worked. I'll leave this here for anyone else who encounters this problem!