Error: No compatible version found: package-json#'^6.3.0' - npm

I want to install latest version of NPM and running this
npm install latest-version
I receive
No compatible version found:package-json'^6.3.0
npm WARN package.json copy-descriptor#0.1.1 No readme data.
npm WARN package.json get-value#2.0.6 No readme data.
npm WARN package.json object-copy#0.1.0 No readme data.
npm WARN package.json static-extend#0.1.2 No readme data.
npm http GET https://registry.npmjs.org/latest-version
npm http 200 https://registry.npmjs.org/latest-version
npm http GET https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz
npm http 200 https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz
npm http GET https://registry.npmjs.org/package-json
npm http 200 https://registry.npmjs.org/package-json
npm ERR! Error: No compatible version found: package-json#'^6.3.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","1.0.0","1.0.1","1.0.2","1.1.0","1.2.0","2.0.0","2.0.1","2.1.0","2.2.0","2.2.1","2.3.0","2.3.1","2.3.2","2.3.3","2.4.0","3.0.0","3.1.0","4.0.0","4.0.1","5.0.0","6.0.0","6.1.0","6.2.0","6.3.0","6.4.0","6.5.0"]
npm ERR! at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:709:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:631:10
npm ERR! at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at FSReqCallback.oncomplete (fs.js:146:23)
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 10.0.18362
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "latest-version"
npm ERR! cwd C:\Users\smuminov
npm ERR! node -v v12.13.0
npm ERR! npm -v 1.2.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\smuminov\npm-debug.log
npm ERR! not ok code 0
how to resolve this issue?
Current npm version - 1.2.24
Current node version - v12.13.0

You are using a very old version of npm.
Use the following command to update npm:
npm install npm#latest

Related

How to fix TypeError: Cannot read property 'latest' of undefined?

My npm version and node version are not the same.
node -v v14.15.3
npm ERR! npm -v 1.3.21
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:688:35)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:676:5
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 FSReqCallback.oncomplete (fs.js:171:23)
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/isaacs/npm/issues>
npm ERR! System Windows_NT 10.0.18363
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm#latest"
npm ERR! cwd C:\Project\theradoc-UI\theradoc\web\ng-src
npm ERR! node -v v14.15.3
npm ERR! npm -v 1.3.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Project\theradoc-UI\theradoc\web\ng-src\npm-debug.log
npm ERR! not ok code 0
When I run the command npm install -g npm#latest, it shows the error that I copy pasted above. Please help.
I faced a similar issue. You may or may not have two installations of Node.js.
First try cleaning the cache by running npm cache clean
If the previous suggestion doesn't solve your issue then you probably have two versions installed. I'd suggest you to delete the npm in AppData, uninstall both versions of Node.js, and install the latest versions.

npm -install error ,I can't install appium

I'm Appium new user I have some error ,when I use the NPM command (linux),I have update my ("nvm" and "npm" )version.
I'm follow Click [here](How to setup Appium in Ubuntu for android " to setup my appium.
How can I do for next step!
root#hauying-yoga-linux:/home/hauying# npm install -g grunt-cli
npm ERR! TypeError: Cannot read property 'match' of undefined
npm ERR! at Unpack.extractOpts.filter
(/usr/share/npm/lib/utils/tar.js:245:19)
npm ERR! at Unpack.[consumeHeader]
(/usr/lib/nodejs/tar/lib/parse.js:134:48)
npm ERR! at Unpack.[consumeChunkSub]
(/usr/lib/nodejs/tar/lib/parse.js:385:30)
npm ERR! at Unpack.[consumeChunk]
(/usr/lib/nodejs/tar/lib/parse.js:362:30)
npm ERR! at Unpack.write
(/usr/lib/nodejs/tar/lib/parse.js:309:25)
npm ERR! at Unzip.ondata (_stream_readable.js:667:20)
npm ERR! at Unzip.emit (events.js:189:13)
npm ERR! at addChunk (_stream_readable.js:284:12)
npm ERR! at readableAddChunk (_stream_readable.js:265:11)
npm ERR! at Unzip.Readable.push (_stream_readable.js:220:10)
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 Linux 4.19.37-5rodete4-amd64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g"
"grunt-cli"
npm ERR! cwd /home/hauying
npm ERR! node -v v10.15.2
npm ERR! npm -v 1.4.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/hauying/npm-debug.log
npm ERR! not ok code 0
root#hauying-yoga-linux:/home/hauying#
I'm fixed.
because my node and npm version too old , I'm update my document will install in my computer.

installing package locally gives an error

When i am trying to install package i'm getting this error. In addition all other packages were installed without any problems. How could i solve this. If i'm changing flag to -g (globally) it works, but i need it to be in my project
npm install --save express-validator
npm http GET https://registry.npmjs.org/express-validator
npm http 304 https://registry.npmjs.org/express-validator
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/validator
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/validator
npm http GET https://registry.npmjs.org/types/bluebird
npm http GET https://registry.npmjs.org/types/express
npm http 404 https://registry.npmjs.org/types/bluebird
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/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 Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm http 404 https://registry.npmjs.org/types/express
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/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 Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/prog/work/appJS/npm-debug.log
npm ERR! not ok code 0
This occurs when ur npm version is down or the library has been removed.
you need to update your npm version...!!
npm update npm#latest

Installing npm on vagrant

I tried to install and use npm in two ways, but I get only errors.
Installing npm by normal way:
vagrant#precise64:~$ npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/vagrant/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Trying to install latest version:
vagrant#precise64:~$ npm install -g npm#latest
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
What should I install before to create this package.json file ane make it work?
npm looks like it's already installed. Go to your project root and:
npm init
It'll walk you through making a package.json file, then you can
npm i whateverpackageyouwant
to your heart's content.

NPM installation error

I tried installing browserify (npm module).. I got following error-
praful#ubuntu:~/terminalcloud$ npm install -g browserify
npm http GET https://registry.npmjs.org/browserify
npm ERR! Error: failed to fetch from registry: browserify
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client /request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/praful/terminalcloud/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "browserify"
npm ERR! cwd /home/praful/terminalcloud
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: browserify
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/praful/terminalcloud/npm-debug.log
npm not ok
I have installed npm package properly. This error occurs for any package that I try installing with npm. What should I do to?
Just wondering, have you tried
npm config set registry http://registry.npmjs.org/
as per this
The probleme comes from the registry you are using, it is using a secure connection with the hyper transfert text protocol, that might screw things up. https://registry.npmjs.org/browserify
you should use a simple registry that is easy fetchable :
sudo npm config set registry http://registry.npmjs.org/