React native PJSIP error in installation module - react-native

I try to install module PJSIP in my react-native project.
URL : https://www.npmjs.com/package/react-native-pjsip
but I am getting below error.
> react-native-pjsip#2.8.0 postinstall /Users/saty/react-native-pjsip
> bash libs.sh
npm WARN react-native-linear-gradient#2.5.6 requires a peer of react-native#>=0.55 but none is installed. You must install peer dependencies yourself.
npm WARN react-dom#15.6.2 requires a peer of react#^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm ERR! code ELIFECYCLE
npm ERR! errno 23
npm ERR! react-native-pjsip#2.8.0 postinstall: `bash libs.sh`
npm ERR! Exit status 23
npm ERR!
npm ERR! Failed at the react-native-pjsip#2.8.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Error 23 is usually a network issue. If you take a look at the script it tries to download the package 2.8.0 from here https://github.com/datso/react-native-pjsip-builder/releases/download/v2.8.0/release.tar.gz. You should confirm that you can download the release, or contact the owner, create an issue or use another module.
Or you could download it and install it manually.
Edit: This is also a bash script so if you are running this in Windows I dont see that script running there.

Related

How to handle conflicting peer dependencies?

As a devDependency I have installed "#typescript-eslint/parser": "~4.31.2"
Running npm install tells me, that a package needs 4.20.0 and another one 4.28.3 - if I understand the error correctly.
How do I handle these npm package conflicts?
npm ERR! While resolving: #nrwl/eslint-plugin-nx#12.9.0
npm ERR! Found: #typescript-eslint/parser#4.31.2
npm ERR! node_modules/#typescript-eslint/parser
npm ERR! dev #typescript-eslint/parser#"~4.31.2" from the root project
npm ERR! #typescript-eslint/parser#"^4.20.0" from eslint-config-next#11.1.2
npm ERR! node_modules/eslint-config-next
npm ERR! dev eslint-config-next#"11.1.2" from the root project
npm ERR! eslint-config-next#"^11.1.0" from #nrwl/next#12.9.0
npm ERR! node_modules/#nrwl/next
npm ERR! dev #nrwl/next#"12.9.0" from the root project
npm ERR! 1 more (#typescript-eslint/eslint-plugin)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #typescript-eslint/parser#"~4.28.3" from #nrwl/eslint-plugin-nx#12.9.0
npm ERR! node_modules/#nrwl/eslint-plugin-nx
npm ERR! dev #nrwl/eslint-plugin-nx#"12.9.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #typescript-eslint/parser#4.28.5
npm ERR! node_modules/#typescript-eslint/parser
npm ERR! peer #typescript-eslint/parser#"~4.28.3" from #nrwl/eslint-plugin-nx#12.9.0
npm ERR! node_modules/#nrwl/eslint-plugin-nx
npm ERR! dev #nrwl/eslint-plugin-nx#"12.9.0" from the root project
You are using npm 7.x, which is more strict about peer dependencies than npm 6.x. The easiest solution is to run npm install with the --legacy-peer-deps flag. In theory, that may result in some incompatibility issues with peer dependencies. In practice, a lot of people do it anyway. And a lot of people are running npm 6.x and that is the default behavior there, so a lot of people are doing it perhaps without even realizing it.
In your case, #nrwl/eslint-plugin-nx#12.9.0 says that it requires #typescript-eslint/parser#4.28.x and you are installing #typescript-eslint/parser#4.31.2. So if you don't want to use npm 6.x or the --legacy-peer-deps solution, another possibility is to install #typescript-eslint/parser#4.28.5 instead of 4.31.2.
Another thing you can do is open a pull request to update #nrwl/eslint-plugin-nx to use ^ in the relevant peerDependencies entry instead of ~. That will allow 4.x for the peer dependency, rather than limiting it to 4.28.x. It's possible they limited it so severely on purpose, but probably not. (I went to look, but there are hundreds of issues opened in that repository so I didn't spend time looking through them.)
Encountered similar errors when running an Azure DevOps build pipeline (which hadn't changed) against source code that also hadn't changed.
Adding the -g npm-reinstall option to the npm install step resolved the issue.
npm install -g npm-reinstall
While using nx monorepo the solution was to run nx migrate 'package'
e.g.
nx migrate #typescript-eslint/parser

NPM install only creating a package-lock.json?

I am working on a Microsoft Surface 3 running Windows 10. I use git bash for windows for file system management. I'm running npm version 6.14.4 and node version 12.16.2
I'm currently working on an app for some school work and want to run a lite-server instead of vscode's go live extension.
My understanding is that npm install should be run outside of the application as a best practice, but once it's running, you can go back in your terminal in vscode and use npm run start or npm run dev to get the server up. I learned that the two-step process from an online course where I cloned the instructor's work from his Github. In other words, he may have done some preliminary steps that I'm leaving out unintentionally.
I visited the npm docs and spend about an hour familiarizing myself with the technology. Found a nice, simple set of commands to get moving:
$ npm install lite-server --save-dev
(which I run in the project's root folder from git bash)
$ yarn add lite-server --dev # or yarn
...and add a "script" entry within your project's package.json file:
Inside package.json...
"scripts": {
"dev": "lite-server"
},
With the above script entry, you can then start lite-server via:
$ npm run dev
Problem is, I get loads of errors upon NPM install, no package.json file is generated (only a package-lock.json), and attempting npm run dev brings up multiple errors.
From NPM install, I see the following issues mostly:
I get deprecated warnings, chokidar, fsevents, urix, etc.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.12: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
I am always getting this package-lock.json notice, not sure what it is:
npm notice created a lockfile as package-lock.json. You should commit this file.
Obviously loads of "skipping optional dependency" warnings:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\chokidar\node_modules\fsevents):
I get "no such file or directory" warnings:
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\smansfield\desktop\bootcamp_code_responses\class_content_1\activity_4\package.json'
I get these warnings:
npm WARN activity_4 No description
npm WARN activity_4 No repository field.
npm WARN activity_4 No README data
npm WARN activity_4 No license field.
From npm run dev I'm getting these errors:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\smansfield\Desktop\bootcamp_code_responses\class_content_1\activity_4\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\smansfield\Desktop\bootcamp_code_responses\class_content_1\activity_4\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\smansfield\AppData\Roaming\npm-cache_logs\2020-04-26T17_59_00_317Z-debug.log
I've searched all manner of blogs for any insight on these items... No one seems to have posted about these exact items:
why NPM install is responding with so many errors, deprecation, etc.
why am I only getting package-lock.json upon install?
why am I always getting these errors when I try to spin up the lite-server, especially these ENOENT codes and path errors?
Thank you for any insight you can provide me on this. I'll most certainly pay it forward.
Sam
Try run npm init first. It will initialize your project with npm.

Visual Studio Code Extension - npm installation failed becuase of package dependency?

I'm trying to write a small extention for Visual Studio Code but it fails right at the beginning.
I installed yo, as intended
npm install -g yo generator-code
however, now when I'm trying to start everything up, I get errors.
I created a project using yo code and following the generator. I tried Extension Typescript and Javascript, both failed.
the settings used:
initialize a git repository: yes
package manager: npm
Running npm install for you to install the required
dependencies. If this fails, try running the command yourself.
The auto installation failed, running npm install however caused the same error:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EPROTO: request to https://registry.npmjs.org/mocha failed, reason: write EPROTO 10300:error:14094417:SSL routines:ssl3_read_bytes:sslv3 alert illegal parameter:c:\\ws\\deps\\openssl\\openssl\\ssl\\record\\rec_layer_s3.c:1407:SSL alert number 47\n
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for #types/vscode#^1.43.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'smartfilesnfolders'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lechn\AppData\Roaming\npm-cache\_logs\2020-03-10T12_50_32_409Z-debug.log
full log: https://gist.github.com/lechnerio/e1356b2edb48cbdedf40fd1570267bb7
thankful for any hints and tips. npm and vscode are up to date.
I've got the same error a moment ago. I solved it by changing #types/vscode version to ^1.42.0 in package.json.

npm install package.js - can I revert to earlier package?

I am following this tutorial on vue.js on YouTube. One of the packages I installed was eslint 5.5 (which is the current version). I saw this error message:
npm ERR! Failed at the server#1.0.0 lint script 'eslint **/*.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 server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint **/*.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jason/Documents/vue-movie/server/npm-debug.log
I tried updating Node and NPM, but that did not change this failure. The tutorial is using "^4.6" and I was wondering if there is a way to revert the package I have to an earlier version? And how would I do that?

Unable to install Appium on Ubuntu 16.04

Is it because of network proxy settings in my machine? Also I am under corporate firewall.
error:Failed at the appium-chromedriver#2.9.2 install script 'node
install-npm.js'
Kindly help me to solve this issue
paranth#paranth-ThinkCentre-M73:~$ npm install -g appium
/home/paranth/.linuxbrew/bin/appium -> /home/paranth/.linuxbrew/lib/node_modules/appium/build/lib/main.js
/home/paranth/.linuxbrew/bin/authorize-ios -> /home/paranth/.linuxbrew/lib/node_modules/appium/node_modules/.bin/authorize-ios
> appium-chromedriver#2.9.2 install /home/paranth/.linuxbrew/lib/node_modules/appium/node_modules/appium-android-driver/node_modules/appium-chromedriver
> node install-npm.js
info Chromedriver Install Installing Chromedriver version '2.21' for platform 'linux' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_linux64 to...
info Chromedriver Install Downloading http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip...
info Chromedriver Install Writing binary content to /tmp/201694-10666-t0tuz0.b4lorsh5mi/chromedriver_linux64.zip...
info Chromedriver Install Extracting /tmp/201694-10666-t0tuz0.b4lorsh5mi/chromedriver_linux64.zip to /tmp/201694-10666-t0tuz0.b4lorsh5mi/chromedriver_linux64
Invalid or unsupported zip format. No END header found
/home/paranth/.linuxbrew/lib
`-- (empty)
npm WARN optional Skipping failed optional dependency /appium/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/home/paranth/.linuxbrew/Cellar/node/6.7.0/bin/node" "/home/paranth/.linuxbrew/bin/npm" "install" "-g" "appium"
npm ERR! node v6.7.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! appium-chromedriver#2.9.2 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver#2.9.2 install script 'node install-npm.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 package,
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! Please include the following file with any support request:
npm ERR! /home/paranth/npm-debug.log
npm ERR! code 1
To set up android automation in linux:
a) linuxbrew installation: https://github.com/Linuxbrew/linuxbrew
b) Download and extract android sdk to home folder: http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
c) Set android sdk path:
Open file by command:
sudo gedit ~/.bashrc
Add these lines at the end of the file:
adding linux brew path
export PATH="$HOME/.linuxbrew/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"
#android
export ANDROID_HOME=/home/asci/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Close the file.
Run the command:
source ~/.bashrc
e) Run these commands one by one:
android
(It will open the sdk manager, and install all the sdk tools from the Tools folder and Android 6.0 API 23)
brew install node
npm install -g appium
appium &
(It will start the appium server needed to run automation)
Get out of firewall or business network and try from a personal data network. It'll work. It worked for me.
Then try "npm install -g appium"