how to solve this problem?
verbose node v10.14.2
verbose npm v6.4.1
error code ELIFECYCLE
error errno 1
error appium-chromedriver#4.10.0 install: `node install-npm.js`
error Exit status 1
error Failed at the appium-chromedriver#4.10.0 install script.
error This is probably not a problem with npm. There is likely additional logging output above.
verbose exit [ 1, true ]
This worked: sudo npm install -g appium --unsafe-perm=true --allow-root
First of all, I would highly recommend using a node version manager for Node/npm installation.
Appium installation works perfectly with node version 10.1.0:
nvm install 10.1.0
//in new shell
nvm use node
npm install -g appium
Update: I think you are facing a similar issue, caused by Windows firewall or some proxy.
What you need to do is set the --chromedriver_cdnurl flag during npm install to the server which is accessible within your firewall:
npm install -g appium --chromedriver_cdnurl=http://localhost:1234
Maybe even better to setup npm proxy following instructions
Related
I've dual Boot(ubuntu/Windows 10) on my laptop.
I am getting this error and I can't run npm install on Ubuntu. I checked with node -v and it shows v17.4.0
:
npm does not support Node.js v13.14.0
npm ERR! Invalid or unexpected token
npm ERR! A complete log of this run can be found in:
npm ERR! /home/diana/.npm/_logs/2022-02-12T09_42_18_704Z-debug-0.log
Update: I had to uninstall and remove all the folders related to node and npm. I've also installed the latest version of nvm 0.39 and only then I managed to actually upgrade the node to the right version. Everything is working now.
How can I completely uninstall nodejs, npm and node in Ubuntu
Have you tried updating your npm?
If no, run this:
sudo apt-get install -y npm
or check this:
https://stackoverflow.com/questions/23393707/how-to-update-npm#:~:text=sudo%20add%2Dapt%2Drepository%20ppa%3Achris%2Dlea/node.js%0Asudo%20apt%2Dget%20update%0Asudo%20apt%2Dget%20install%20nodejs%20npm
I am very new to react native and nodejs . Today I installed nodejs on my Elementary Os and installed npm and npx. Now when I try to run npx create-react-app myApp i am getting the following error :
npm ERR! cb.apply is not a function npm ERR! A complete log of this
run can be found in: npm ERR!
/home/user/.npm/_logs/2021-04-29T08_55_29_599Z-debug.log Install for [
'create-react-project#latest' ] failed with code 1
I found some answers on stack overflow but they didn't solve this. Any help would be much appreciated.
npx version:10.2.2
npm version: 7.10.0
node version :16.0.0
I finally solved the error and i am going to keep this thread open if anyone else faces the same problem.
By default, npm installs packages in the local node_modules/ directory. Since npm i npm is shorthand for npm install npm, it will install the latest version of npm locally.
However, when run npm in a shell, the shell picks up the npm in your $PATH, which is probably the global installation.
To update the global installation of npm, run:
npm install --global npm
I'm trying to install webtorrent-hybrid to build an electron p2p app. I'm using vue ui because the app will use vue to manage front-end stuff and I've successfully created a new project that use vue-cli-plugin-electron-builder rc-6, Vue 3 and node v15.4.0. The Electron version installed by the vue cli plugin is 11.0. Anyway When I try to install webtorrent-hybrid I always get this error in terminal
npm ERR! code 1
npm ERR! path /Users/dev/Sites/wtorrent-electron/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c node scripts/download-prebuilt.js
npm ERR! /bin/sh: node-pre-gyp: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dev/.npm/_logs/2021-03-26T16_40_51_717Z-debug.log
command failed: npm install --loglevel error webtorrent-hybrid --legacy-peer-deps
Is there a way to fix it so I can install the library? If isn't possible to solve the problem, is there any alternative to use webtorrent inside an electron app?
Try Node 14 (current lts) which has better prebuilts and if not, using the command npm install --unsafe-perm=true should do the trick.
I run first this
npm i -g #mapbox/node-pre-gyp
And after this I ran
npm i webtorrent-hybrid
and it worked
I tried to create a new NodeJs project, when i ran "npm init" the package.json was created successfully but when I tried to run "npm install express" it showed "npm ERR! code ERR_OUT_OF_RANGE". I am not able to run npm install without getting this error.
I tried to install other packages, i tried sudo, and I removed npm/node and reinstalled nvm/node but it is still the same.
Thank you for your help !
npm install express
npm ERR! code ERR_OUT_OF_RANGE
npm ERR! The value of "err" is out of range. It must be a negative integer. Received 536870212
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2019-09-18T14_49_07_222Z-debug.log
The issue is a mismatch between your versions of Node and NPM.
This can occur when one is updated without the other.
To prevent these issues, use nvm to manage your Node version:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
# Example: Selecting Node v13
# For complete list of available versions run `nvm ls-remote`
nvm install 13
nvm use 13
This will select matching versions of Node and NPM.
This error was caused by a the most recent version of node which was 12.10.0, when I installed and used the 10.16.0 version of node, the error was gone.
i ran into something very similar with react native - metro and it seems I just had to deactivate my firewall LULU.
Basically I'm trying to test out Hermione (refer to tags) but ran into errors:
when I run
npm install hermione chai
I end up getting an error for installing the png-img package that ends up with something like this in the terminal:
gyp ERR! stack Error: `gyp` failed with exit code: 1
I also noticed that gyp wasn't the most up to date:
gyp ERR! node-gyp -v v3.6.2
so I naturally tried to upgrade it by:
npm install -g node-gyp
but when I retried installing hermione I still get same error, more importantly I noticed that node-gyp was still running the same older version.
After digging I also saw suggestion to install png-img by itself, ran into same problem.
Finally found this link
turns out npm has it's own internal bundle of node-gyp and you have to force upgrade it by:
npm explore npm -g -- npm install node-gyp#latest
you may need to use sudo for the above, but I believe I've also read that if you need to run sudo prior to npm commands you may have installed it wrong...