centos8 install appium failed:errno ENOENT appium-windows-driver#1.18.1 install: `node install-npm.js` - appium-android

install nodejs:
yum install gcc-c++ openssl-devel
wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz
tar -xvf node-v14.17.0-linux-x64.tar.xz
vi /etc/profile
# nodejs PATH
export NODE_HOME=/home/selenium/node-v14.17.0-linux-x64
export PATH=$NODE_HOME/bin:$PATH
source /etc/profile
when I run
npm install -g appium
sh: node: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! appium-windows-driver#1.18.1 install: node install-npm.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the appium-windows-driver#1.18.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-05-14T05_06_33_166Z-debug.log
when I run
node --version
it can print curreent node version:v14.17.0
anyone can help?

nvm install node
use this command to install node,then I can successfully install appium.

Related

Error running 'npm install -g firebase-tools'

I ran the following code on the terminal to instal firebase-tools
npm install -g firebase-tools
I am trying to install this to use cloud functions on firebase and I got these errors:
juan#juans-Air ~ % npm install -g firebase-tools
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/firebase-tools
npm ERR! dest /usr/local/lib/node_modules/.firebase-tools-ENG41nb9
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/firebase-tools' -> '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/firebase-tools' -> '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/firebase-tools',
npm ERR! dest: '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/juan/.npm/_logs/2022-10-30T02_59_24_185Z-debug-0.log
juan#juans-Air ~ %
Is there a different way to install this?
i ran it with sudo and it worked::
sudo npm install -g firebase-tools

Unable to install p5.serialserver on a mac

I have been trying to install p5.serial server on a mac for 2 days to no avail.
I have tried everything I can think of to try and download p5.serialserver on a mac. I used all three methods suggested in the documentation (https://github.com/p5-serial/p5.serialport) which were
clone the repository and run
npm install
This failed when I ran npm install and I was not able to proceed to the next step. Then I tried
sudo npm install -g p5.serialserver
and
npm install p5.serialserver
It keeps giving me errors that 3 arguments are required, but 2 were provided like below:
npm ERR! /path/path/path/node-gyp/17.4.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
Then the following:
npm ERR! ^
npm ERR! 4 errors generated.
npm ERR! make: *** [Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/path/path/path/.nvm/versions/node/v17.4.0/bin/node" "/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/p5.serialserver/node_modules/#serialport/bindings
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
I assume this is because there are updated required and some of the packages required have changed, but I'm not sure which packages or how to resolve this. I tried downgrading the version of node I was using, but that did not work. If anyone has any more suggestions please inform.
Update: I ran p5.serialserver at https://npm.runkit.com/p5.serialserver.
It gave more errors based on what is in the module. Does that mean that it is not possible to use? Errors linked here: https://runkit.com/embed/9rlymlps3vcx
I have finally figured this out after a professor sent resources to explain the error. Basically, you need to download to nodev12.20.2 in order to use p5 serial (probably because of outdated dependencies)
I did this by running the following in the terminal. You can use nvm to run different versions of node, so I suggest using it to install node if you didn't already:
nvm install 12.20.2
nvm use 12.20.2
node -v
Confirm that the terminal is running node v12.20.2
sudo npm install serialport --unsafe-perm -g
sudo npm install ws -g
sudo npm install p5.serialserver --unsafe-perm -g
Then just run the following to start the server:
p5serial
And it should start the server. Hope this helps someone else because this was driving me crazy.

Cannot install Ionic on macOS 10.12.3

I have had considerable trouble trying to install Ionic on my Mac. I have tried every suggestion posted on the web without success. I have tried installing as root, using sudo, you name it.
Using Homebrew I have successfully installed node : v6.10.0 and npm v4.1.2.
Issuing: "npm install -g cordova ionic"
Results in:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path /Users/craigmaxey/.npm
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/craigmaxey/.npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path npm-debug.log.3262676290
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.3262676290' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/craigmaxey/npm-debug.log
This:
EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
indicates that you're missing write privileges on /Users/craigmaxey/.npm. Usually, you can fix this by running npm with sudo:
sudo npm install -g cordova ionic
If this doesn't work for you (since you mentioned you already tried sudo), please add the exact error message you get from running this exact command.
I too was getting the same errors and was able to get it to install following these steps:
Using Finder, manually create a folder called "#ionic" at this location: /usr/local/lib/node_modules/#ionic
Using finder, if "ionic" folder exists at /usr/local/bin/ionic, delete it
run sudo npm install -g #ionic/cli

Ionic is not recognized as an internal or external command

how to resolve can i fixed it . i already install cordova and ionic global
C:\Users\sever>npm install -g ionic
npm ERR! not a package C:\Users\sever\ionic
npm ERR! addLocal Could not install C:\Users\sever\ionic
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\sever\node_modu
les\npm\bin\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v5.1.1
npm ERR! npm v3.9.3
npm ERR! path C:\Users\sever\AppData\Local\Temp\npm-5068-24aad619\unpack-77f32b4
3\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
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\sever\npm-debug.log
you just have to run
npm install -g cordova
and
npm install -g ionic
And then in windows you have to reopen the cmd window, else the changes aren't noticed.
My problem is npm -v is 3.10.8, which is lower than 4, causing me npm install -g ionic cordova always fail. Giving error like below.
'ionic' is not recognized as an internal or external command, ...
After I run npm install -g npm everything seem fine, and now I can run npm install -g ionic cordova

Npm install directly from Github Error: ENOENT

I'm running an example from build-nodejs-npm-installation-package-scratch. Instead of uploading to npm repository I'm putting it on Github and trying to download it via npm instead. I run npm install git+https://github.com/t2wu/replaceme.git and got the following:
npm ERR! Error: ENOENT, chmod '/private/tmp/node_modules/replaceme_tim/replaceme.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "git+https://github.com/t2wu/replaceme.git"
npm ERR! cwd /private/tmp
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /private/tmp/node_modules/replaceme_tim/replaceme.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/tmp/npm-debug.log
npm ERR! not ok code 0
I have a package.json in there, I cannot figure out what is wrong.
EDIT: I can install Express OK, but I can't install my practice module
This happens due to missing permissions or unlinked files while npm was working. This topicc is also seen at github, here.
Try running with admin perms.