Node.js Appium install fail - node.js

I tried to install Appium with command: npm install -g appium#1.6.4-beta
I am behind corporate proxy. So i set new proxy with:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
also i tried:
--ignore_ssl or --proxy http://10.165.42.170:8080
My soft:
Node.js: v4.6.0
node-gyp -v v3.4.0
npm v4.4.4
Windows 8.1
But i am getting this error in install:
C:\Project\taf>npm install -g appium#1.6.4-beta
npm WARN deprecated babel-core#5.8.24: Babel 5 is no longer being maintained. Up
grade to Babel 6.
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue
npm WARN deprecated line-numbers#0.2.0: Copy its ~20 LOC directly into your code
instead.
C:\Users\JE11954\AppData\Roaming\npm\appium -> C:\Users\JE11954\AppData\Roaming\
npm\node_modules\appium\build\lib\main.js
> appium-chromedriver#2.11.0 install C:\Users\JE11954\AppData\Roaming\npm\node_m
odules\appium\node_modules\appium-chromedriver
> node install-npm.js
info Chromedriver Install Installing Chromedriver version '2.28' for platform 'w
in' and architecture '32'
info Chromedriver Install Opening temp file to write chromedriver_win32 to...
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.co
m/2.28/chromedriver_win32.zip...
RequestError: Error: connect ETIMEDOUT 172.217.23.208:443
at new RequestError (C:\Users\JE11954\AppData\Roaming\npm\node_modules\appiu
m\node_modules\request-promise\lib\errors.js:11:15)
at Request.RP$callback [as _callback] (C:\Users\JE11954\AppData\Roaming\npm\
node_modules\appium\node_modules\request-promise\lib\rp.js:60:32)
at self.callback (C:\Users\JE11954\AppData\Roaming\npm\node_modules\appium\n
ode_modules\request\request.js:188:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (C:\Users\JE11954\AppData\Roaming\npm\node_modules
\appium\node_modules\request\request.js:884:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at TLSSocket.socketErrorListener (_http_client.js:269:9)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at emitErrorNT (net.js:1269:8)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
C:\Users\JE11954\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.x (node_modules\appiu
m\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver#2.11.0 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver#2.11.0 install script 'node install-n
pm.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appium-chromedriver p
ackage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install-npm.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appium-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JE11954\AppData\Roaming\npm-cache\_logs\2017-04-04T12_46_5
6_785Z-debug.log

Updating Node / npm solved install issues for me.

I don't know what is causing this error.I have struggled a lot to resolve this by installing different node version and npm versions etc. but no success.
I have installed appium through yarn as below steps:
Download yarn.exe file from https://github.com/yarnpkg/yarn/releases
Run that .exe file and install as per instructions.
Once installation is finished, Add bin folder of yarn installation to your
PATH
i.e (In my machine : "C:\Program Files (x86)\Yarn\bin\")
Now run the below command :
yarn global add appium
This will install appium in your machine.
If this also doesn't work one more suggestion i can give is as below:
In general if you install appium through npm or yarn what it will do is it will install all the packages that will come along with appium latest GUI version i.e appium 1.7.2 which means whatever the packages are getting installed through npm or yarn will also come along with GUI version of appium which is appium-desktop.Please follow the below instructions:
Install latest appium-desktop version from the link : https://github.com/appium/appium-desktop/releases/tag/v1.4.1
Now go to installation path of appium-desktop.In my machine below is the path :
C:\Users\pawan.lingutla\AppData\Local\Programs\appium-
desktop\resources\app\node_modules\appium
In this folder you will find all the packages that will come with npm installation of appium.
This is a workaround when you face issues while installing appium into node_modules via npm or yarn.

Related

npm ERESOLVE could not resolve #angular/elements#11.2.14 after trying to update to angular 12

I have a angular 11 application and i wanted to update it to the latest 14, based on the officiel website i had to go update one by one so 11 to 12, 12 to 13 and 13 to 14.
So i created a new branch on git and started [here][1] with ng update #angular/core#12 #angular/cli#12, i had a bunch of dependencies issues after so i rolled back on the master branch, but i still have problems with npm dependencies, everytime i do a npm install i have something like this that i don't understand at all :
npm i
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #angular/elements#11.2.14
npm ERR! Found: #angular/core#11.0.9
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"~11.0.9" from the root project
npm ERR! peer #angular/core#"11.0.9" from #angular/animations#11.0.9
npm ERR! node_modules/#angular/animations
npm ERR! #angular/animations#"~11.0.9" from the root project
npm ERR! peer #angular/animations#"^11.0.0 || ^12.0.0-0" from #angular/material#11.0.3
npm ERR! node_modules/#angular/material
npm ERR! #angular/material#"^11.0.3" from the root project
npm ERR! 1 more (#angular/platform-browser)
npm ERR! 13 more (#angular/cdk, #angular/common, #angular/fire, ...)
I tried to do npm install --force and npm install --legacy-peer-deps, but still i can't just do npm install as i'm used to, is there something that breaks angular when doing the ng update.
for the versions that i use i have :
Angular CLI: 11.0.7
Node: 16.15.1
OS: win32 x64
Angular: 11.0.9
npm: 8.11.0
Do you think i need to reinstall angular? I don't get how the project can be broken when i rolled back to the branch before any modification on the project. I feel like the easiest way to update is to create a new project on the version you want and add everything back in it little by little.
if you have any idea on this i'll take it.
Thanks in advance !
[1]: https://update.angular.io/?l=3&v=11.0-12.0

Issue when I try to execute npm install

when I run the command npm install, it displays this error:
[log#server:www]$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: vue#2.6.14
npm ERR! node_modules/vue
npm ERR! dev vue#"^2.5.17" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"^3.0.0" from vee-validate#4.4.4
npm ERR! node_modules/vee-validate
npm ERR! vee-validate#"^4.2.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-09T01_39_40_386Z-debug.log
I wonder, how can I fix it? What does it mean?
Thanks
It looks like you're trying to install vee-validate version 4.0 in a Vue 2.x application. You can see the compatible version in the vee-validate repo.
How to fix:
Option 1:
Install an older version of Vee-validate (v2 or v3).
First, you'll need to uninstall the version you currently have installed (I'm assuming you installed vee-validate#next since that's the doc recommendation)
npm uninstall vee-validate#next
You can then find the list of versions available with
npm info vee-validate versions
Finally, install an older version with
npm install vee-validate#3.4.9
Replace the 3.4.9 with whatever version you would like to install - as of the time of writing, 3.4.9 is the latest stable tag
Option 2:
Upgrade from Vue 2 to Vue 3 following the upgrade guide.
Note that this is still a work in progress and may have some stability issues and depending on the state of the project I would consider using the above option for the time being.
Step:-1 Make sure node.js is installed on your system. You can check with the command npm --version or node --version
Step:-2 Clear npm cache. run this command npm cache clear -f
Step:-3 Then try to run npm install

npm install ERR! code ENOENT

I am the npm install -g ionic write code the nodejs console and this error how can I fix . I am one week the this problem and every solution try .
nodejs -v 6.4
npm 3.10.6
cordova 6.3
1) Problem ionic version
C:\Users\jhon>ionic --version
Caught exception:
Error: Cannot find module 'lodash/assign'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\jhon\AppData\Roaming\npm\node_modules\ionic\node_modules\xmlbuilder\lib\index.js:5:12)
at Object.<anonymous> (C:\Users\jhon\AppData\Roaming\npm\node_modules\ionic\node_modules\xmlbuilder\lib\index.js:14:4)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
2) problem npm install -g ionic
**
C:\Users\jhon>npm install -g ionic
npm WARN deprecated cross-spawn-async#2.1.9: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated lodash#2.1.0: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\Users\jhon\AppData\Roaming\npm
`-- (empty)
npm WARN In ionic#2.0.0 replacing bundled version of semver with semver#4.2.0
npm WARN In ionic#2.0.0 replacing bundled version of ionic-app-lib with ionic-app-lib#2.0.0
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jhon\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! path C:\Users\jhon\AppData\Roaming\npm\node_modules\.staging\ansi-6308e9d7
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\jhon\AppData\Roaming\npm\node_modules\.staging\ansi-6308e9d7' -> 'C:\Users\jhon\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\jhon\AppData\Roaming\npm\node_modules\.staging\ansi-6308e9d7' -> 'C:\Users\jhon\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\jhon\npm-debug.log
npm ERR! code 1
**
Installing ionic when your running behind a proxy
Uninstall Node.js if your facing a lot of errors.(optional)
Install Nodejs(mandatory)
Install Python(mandatory)
During installation ensure that environmental variable for python is checked
Step 1:
start->cmd->(right click ) run as administrator
Step 2:
type the following command **cd** to work as a root user
Step 3:
Setting up windows proxy as below(use your organisation proxies)
set http_proxy=http://proxy.organisation.com:8000
set https_proxy=https://proxy.organisation.com:8000
Step 4:
Setting up npm proxy as below(use your organisation proxies)
npm config set proxy http://proxy.organisation.com:8000
npm config set https-proxy http://proxy.organisation.com:8000
Step 5:
Dont navigate to the user folder(From the root folder) execute the following command
npm install -g cordova ionic
which will install both ionic and cordova.
Possible Errors:
Python not found.
Windows_NT -> reason is your not an administrator.
ECONNREFUSED -> your connection is not going through proxy check for your proxy in npm using
npm config list command.

Unable to upgrade - slimerjs missing...?

I'm running on OSX (El Capitan) with node v5.0.0 and npm v3.3.9. if I attempt an upgrade:
npm upgrade
I get the error below:
npm WARN deprecated lodash#0.9.2: lodash#<2.0.0 is no longer
maintained. Upgrade to lodash#^3.0.0
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm"
"upgrade"
npm ERR! node v5.0.0
npm ERR! npm v3.3.9
npm ERR! code EREADFILE
npm ERR! Error extracting /Users/ekkis/.npm/slimerjs/0.9.5/package.tgz
archive: ENOENT: no such file or directory, open
'/Users/ekkis/.npm/slimerjs/0.9.5/package.tgz'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! [https://github.com/npm/npm/issues]
npm ERR! Please include the following file with any support request:
npm ERR! /Users/ekkis/Downloads/client-side-testing-0.1/npm-debug.log
I've tried uninstalling this slimerjs (whatever that is) both locally and globally but it still fails. if I look in the given directory there is indeed no 0.9.5 installed but I do find a 0.9.6
so what requires it and why isn't it satisfied with the later version? and most importantly, how do I fix it?
someone suggested 3.3.9 was rather behind the times. upgrading (now v.3.5.2) seemed to solve the problem:
sudo npm install -g npm
The problem is known in the NPM project here - https://github.com/npm/npm/issues/10057. There's an issue with npm#3.x when installing packages having "latest" set to a pre release version.
My fix was to downgrade npm to 2.14.10 - the latest stable in the 2.x series since there was no fix yet posted.
sudo npm install -g npm#2.14.10
for timebeing, Install specific version of slimmerjs eg. npm install slimerjs#0.9.5
https://github.com/graingert/slimerjs/issues/34

SSL Error: CERT_UNTRUSTED while using npm command

I am trying to install express framework using npm command but getting following error.
error message is
E:\myFindings\nodejs_programs\node>npm install -g express
npm http GET https://registry.npmjs.org/express
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:409:26)
npm ERR! at ClientRequest.g (events.js:185:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:88:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1445:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1356:20)
npm ERR! at CleartextStream.CryptoStream._push (tls.js:396:27)
npm ERR! at SecurePair.cycle (tls.js:751:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:131:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! [Error: SSL Error: CERT_UNTRUSTED]
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "express"
npm ERR! cwd E:\myFindings\nodejs_programs\node
npm ERR! node -v v0.8.0
npm ERR! npm -v 1.1.32
npm ERR! message SSL Error: CERT_UNTRUSTED
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! E:\myFindings\nodejs_programs\node\npm-debug.log
npm ERR! not ok code 0
help me to sort out
You can bypass https using below commands:
npm config set strict-ssl false
or set the registry URL from https or http like below:
npm config set registry="http://registry.npmjs.org/"
However, Personally I believe bypassing https is not the real solution, but we can use it as a workaround.
npm ERR! node -v v0.8.0
npm ERR! npm -v 1.1.32
Update your node.js installation.The following commands should do it (from here):
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Edit: okay, if you really have a good reason to run an ancient version of the software, npm set ca null will fix the issue. It happened, because built-in npm certificate has expired over the years.
I had same problem and finally I understood that my node version is old. For example, you can install the current active LTS node version in Ubuntu by the following steps:
sudo apt-get update
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs -y
Installation instructions for more versions and systems can be found in the following link:
https://github.com/nodesource/distributions/blob/master/README.md
I think I got the reason for the above error. It is the corporate proxy(virtual private network) provided in order to work in the client network. Without that connection I frequently faced the same problem be it maven build or npm install.
If you're behind a corporate proxy, try this setting for npm with your company's proxy:
npm --https-proxy=http://proxy.company.com install express -g
Since i stumbled on the post via google:
Try using npm ci it will be much than an npm install.
From the manual:
In short, the main differences between using npm install and npm ci are:
The project must have an existing package-lock.json or npm-shrinkwrap.json.
If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock.
npm ci can only install entire projects at a time: individual dependencies cannot be added with this command.
If a node_modules is already present, it will be automatically removed before npm ci begins its install.
It will never write to package.json or any of the package-locks: installs are essentially frozen.
Reinstall node, then update npm.
First I removed node
apt-get purge node
Then install node according to the distibution. Docs here .
Then
npm install npm#latest -g
Only recommended if you are running a very old version of node/npm where the certificates have expired or been replaced,
first run npm set ca null
then do your npm install

Resources