I can't install Cordova within the command-line - android

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
npm ERR! Error: No compatible version found: semver#'^4.3.x'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.0.10","1.0.11","1.0.12","1.0.13","1.0.14","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","2.0.0-alpha","2.0.0-beta","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9","2.0.10","2.0.11","2.1.0","2.2.0","2.2.1","2.3.0","2.3.1","2.3.2","3.0.0","3.0.1","4.0.0","4.0.2","4.0.3","4.1.0","4.1.1","4.2.0","4.2.1","4.2.2","4.3.0","4.3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.3.6","5.0.0","5.0.1"]
npm ERR! at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:719:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:638:10
npm ERR! at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:142:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, 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.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! cwd C:\Users\Hafeedh
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Hafeedh\npm-debug.log
npm ERR! not ok code 0
C:\Users\Hafeedh>

Related

Unable to install and uninstall NPM packages

Here's what I get after I try to install/uninstall packages:
(base) vivekrk#Viveks-MacBook-Air PUPA % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-navigation-drawer#1.4.0
npm ERR! Found: react-native-screens#3.18.0
npm ERR! node_modules/react-native-screens
npm ERR! react-native-screens#"^3.18.0" from the root project
npm ERR! peer react-native-screens#">= 3.0.0" from #react-navigation/native-stack#6.9.0
npm ERR! node_modules/#react-navigation/native-stack
npm ERR! #react-navigation/native-stack#"^6.9.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-screens#"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer#1.4.0
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer#"^1.4.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-screens#1.0.0-alpha.23
npm ERR! node_modules/react-native-screens
npm ERR! peer react-native-screens#"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer#1.4.0
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer#"^1.4.0" 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 /Users/vivekrk/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vivekrk/.npm/_logs/2022-10-10T04_17_37_997Z-debug-0.log
Also I'm unable to run npx react-native start
This is happening after I installed few npm packages and were not useful so I uninstalled. But after that I couldn't install new packages.
Please resolve my problem!!
Maybe you have dependency conflict, so you can try to run it with --force
Full command:
npm install --force
Or you can try to downgrade your nodejs version.

Problem with installing quick.db (Termux)

I tried to install quick.db with npm:
$ npm i quick.db better-sqlite3
And it's giving me an error:
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../prebuild-install/bin.js
npm ERR! dest /storage/emulated/0/bot/node_modules/.bin/prebuild-install
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../prebuild-install/bin.js' -> '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'
npm ERR! [Error: EPERM: operation not permitted, symlink '../prebuild-install/bin.js' -> '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../prebuild-install/bin.js',
npm ERR! dest: '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'
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! /data/data/com.termux/files/home/.npm/_logs/2022-07-20T09_05_11_700Z-debug-0.log
So I think this is problem with installing a better-sqlite3, beacuse I don't have problems with installing only quick.db:
npm i quick.db

how to resolve npm install -g cordova ionic npm ERR! registry error parsing json?

i am trying to install Cordova and ionic on my machine but when i type below command it gives me following error-
npm install -g cordova ionic
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program File
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <HTML>
npm ERR! <Head>
npm ERR! <TITLE>404 Not Found
npm ERR! </TITLE>
npm ERR! </HEAD>
npm ERR! <BODY bgcolor="#FFFFFF"><h1>
npm ERR! 404 Not Found
npm ERR! </h1>
npm ERR! </BODY>
npm ERR! </HTML>
npm ERR!
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!
npm-debug.log`enter code here`
how to resolve this issue ? please help.

error npm install -g ionic

npm install -g ionic
npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/ionic'
npm ERR! { [Error: EACCES, mkdir '/usr/lib/node_modules/ionic']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/lib/node_modules/ionic',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/lib/node_modules/ionic',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-72-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/livemen
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /usr/lib/node_modules/ionic
npm ERR! fstream_path /usr/lib/node_modules/ionic
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/lib/node_modules/ionic'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-72-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/livemen
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/livemen/npm-debug.log
npm ERR! not ok code 0
Like the error says, try running this again as administrator, i.e. try sudo npm install -g ionic.
You run npm with user permissions (which is correct way) but it cannot create subdirectories inside /usr/lib. A recommended way to fix it is to change the ownership
sudo chown -R $USER /usr/lib
provided you are the only user who should install global node packages on your machine.
Resist the temptation to sudo npm :-)
See here for more details.

Phonegap installation issue via cmd nodejs [windows 7]

Im trying to install phonegap using the cmd
"npm install -g phonegap"
but its not installing and giving me installation failed message ive pasted the cmd message below
so how do i set the proxy settings(assuming thats the issue) which nodejs can use to connect to the internet and complete the installation of phonegap
my system config is windows 7 64bit
C:\Windows\system32>npm install -g phonegap
npm http GET https://registry.npmjs.org/phonegap
npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:901:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program
Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
npm ERR! stack at errnoException (net.js:901:11)
npm ERR! stack at Object.afterConnect [as oncomplete]
(net.js:892:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
Solved it
Just had to set
npm config set proxy http://usr:pwd#proxyname:port
npm config set https-proxy http://usr:pwd#proxyname:port
npm config set registry http://registry.npmjs.org/

Categories

Resources