I am having this error in installing less. I use this code npm install -g less but it's showing this kind of error:
> vagrant#precise32:/$ sudo npm install -g less
> npm http GET http://registry.npmjs.org/less npm http 304
> http://registry.npmjs.org/less npm http GET
> http://registry.npmjs.org/mime npm http GET
> http://registry.npmjs.org/mkdirp npm http GET
> http://registry.npmjs.org/request npm http GET
> http://registry.npmjs.org/clean-css npm http GET
> http://registry.npmjs.org/source-map npm http 304
> http://registry.npmjs.org/mime npm http 304
> http://registry.npmjs.org/request npm http 304
> http://registry.npmjs.org/mkdirp npm http 304
> http://registry.npmjs.org/clean-css npm WARN optional dependency
> failed, continuing clean-css#2.0.x npm http 304
> http://registry.npmjs.org/source-map npm ERR! error installing
> less#1.6.3 npm ERR! error rolling back less#1.6.3 Error: UNKNOWN,
> unknown error '/usr/local/lib/node_modules/less'
>
> npm ERR! Unsupported npm ERR! Not compatible with your version of
> node/npm: request#2.44.0 npm ERR! Required: ["node >= 0.8.0"] npm ERR!
> Actual: {"npm":"1.1.4","node":"0.6.12"} npm ERR! npm ERR! System
> Linux 3.2.0-23-generic-pae npm ERR! command "node" "/usr/bin/npm"
> "install" "-g" "less" npm ERR! cwd / npm ERR! node -v v0.6.12 npm ERR!
> npm -v 1.1.4 npm ERR! code ENOTSUP npm ERR! message Unsupported npm
> ERR! errno {} npm http GET http://registry.npmjs.org/requirejs/0.26.0
> npm ERR! npm ERR! Additional logging details can be found in: npm ERR!
> /npm-debug.log npm not ok vagrant#precise32:/$
EDITED:
I installed newer version of node based on the answers. Im having now this prompt. Is this an error? thanks
/usr/local/bin/lessc -> /usr/local/lib/node_modules/less/bin/lessc
less#2.5.0 /usr/local/lib/node_modules/less
âââ graceful-fs#3.0.6
âââ mime#1.3.4
âââ image-size#0.3.5
âââ promise#6.1.0 (asap#1.0.0)
âââ errno#0.1.2 (prr#0.0.0)
âââ mkdirp#0.5.0 (minimist#0.0.8)
âââ source-map#0.4.2 (amdefine#0.1.0)
âââ request#2.55.0 (caseless#0.9.0, json-stringify-safe#5.0.0, aws-sign2#0.5.0, forever-agent#0.6.1, stringstream#0.0.4, oauth-sign#0.6.0, tunnel-agent#0.4.0, isstream#0.1.2, node-uuid#1.4.3, qs#2.4.1, combined-stream#0.0.7, form-data#0.2.0, mime-types#2.0.10, tough-cookie#0.13.0, bl#0.9.4, hawk#2.3.1, http-signature#0.10.1, har-validator#1.6.1)
my version of Ubuntu is 12.04. Please help, I need it as soon as possible for my project. Thanks :)
Try updating your version of node.
npm ERR! Required: ["node >= 0.8.0"]
Actual: {"npm":"1.1.4","node":"0.6.12"}
See here for instructions: https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version
Try to upgeade your npm/node to latest version, and then try again
Related
I am trying to run the “npm install” command on an admittedly old version of npm and have run into the following issue, even after running “npm cache clean”, We are running version 1.3.6 because we are attempting to rebuild the existing software after a hardware failure. Any pointers would be appreciated.
npm WARN package.json ooi-ui#0.0.1 No repository field.
npm http GET http://registry.npmjs.org/videojs-wavesurfer
npm http 200 http://registry.npmjs.org/videojs-wavesurfer
npm http GET http://registry.npmjs.org/videojs-wavesurfer/-/videojs-wavesurfer-2.11.0.tgz
npm http 200 http://registry.npmjs.org/videojs-wavesurfer/-/videojs-wavesurfer-2.11.0.tgz
npm http GET http://registry.npmjs.org/video.js
npm http GET http://registry.npmjs.org/wavesurfer.js
npm http 200 http://registry.npmjs.org/wavesurfer.js
npm http GET http://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-4.2.0.tgz
npm http 200 http://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-4.2.0.tgz
npm http 200 http://registry.npmjs.org/video.js
npm http GET http://registry.npmjs.org/video.js/-/video.js-7.10.2.tgz
npm http 200 http://registry.npmjs.org/video.js/-/video.js-7.10.2.tgz
npm http GET http://registry.npmjs.org/babel/runtime
npm http GET http://registry.npmjs.org/videojs/http-streaming/2.2.4
npm http GET http://registry.npmjs.org/videojs/xhr/2.5.1
npm http GET http://registry.npmjs.org/global/4.3.2
npm http GET http://registry.npmjs.org/keycode
npm http GET http://registry.npmjs.org/safe-json-parse/4.0.0
npm http GET http://registry.npmjs.org/videojs-font/3.2.0
npm http GET http://registry.npmjs.org/videojs-vtt.js
npm http 200 http://registry.npmjs.org/keycode
npm http GET http://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz
npm http 200 http://registry.npmjs.org/safe-json-parse/4.0.0
npm http GET http://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz
npm http 404 http://registry.npmjs.org/videojs/http-streaming/2.2.4
npm http 200 http://registry.npmjs.org/global/4.3.2
npm http 405 http://registry.npmjs.org/babel/runtime
npm http GET http://registry.npmjs.org/global/-/global-4.3.2.tgz
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR! at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:108: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 2.6.32-754.33.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/ooiui/ooi-ui
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! type non_object_property_load
npm http 200 http://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz
npm http 200 http://registry.npmjs.org/videojs-vtt.js
npm http 200 http://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz
npm ERR! Error: No dist in undefined package
npm ERR! at next (/usr/lib/node_modules/npm/lib/cache.js:746:26)
npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:739:5
npm ERR! at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR! at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:108: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 2.6.32-754.33.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/ooiui/ooi-ui
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm http GET http://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.2.tgz
npm http 404 http://registry.npmjs.org/videojs/xhr/2.5.1
npm http 200 http://registry.npmjs.org/global/-/global-4.3.2.tgz
npm http 200 http://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.2.tgz
npm http 200 http://registry.npmjs.org/videojs-font/3.2.0
npm http GET http://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz
npm http 200 http://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/ooiui/ooi-ui/npm-debug.log
npm ERR! not ok code 0
It seems pretty clear that the "404" error code means that npm is not finding the package from the registry. Is this a show stopper, or is there a way forward? Thanks in advance.
The TL;DR on this is update to npm#2.
npm 1.3.6 is 7 years old as of this writing. It is long out of support and the probability that it is incompatible with the current registry is very high.
In comparison, I notice you're running Node.js 0.10.48 which is "only" four years old. And while it too is long out of support, at least 0.10.48 is the most recent version in the 0.10 line. So that's good.
Node.js 0.10.48 shipped with npm 2.x, so somehow, you have an older version of npm than the version that came by default with the version of Node.js you're using. That's often a sign of multiple versions installed on the machine and PATH weirdness that can cause mysterious errors. If you're able to resolve that, it may fix your problem here.
The first dependency listed in your log above is videojs-wavesurfer 2.11.0. I tried installing that with Node.js 0.10.48 and npm 1.3.6. I got a certificate error, so I (temporarily) disabled SSL certificate verification. After doing that, I tried again and got an error similar to yours.
I updated to npm#2 and then was able to install the package without a problem.
I am trying to install openlayers within my Express project using npm to create custom builds but I get the following error:
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'mapbox/vector-tile' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'openlayers'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "openlayers"
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! not ok code 0
I tried updating npm and installing vector-tile manually but it didn't help.
What am I doing wrong?
EDIT: same error when calling npm install ol instead of npm install openlayers.
Use a more recent version of node and npm, preferably the LTS versions
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
I am trying to install some dependencies using npm install, but I am facing issues with it. I new to npm, so I am not able to figure out what is the problem in it?
Below is my command and its result.
npm install –- save babelify#7.2.0 browserify-middleware#7.0.0
express#4.13.3 react#0.14.3 reactify#1.1.1 browser-sync#2.10.0
babel-preset-react#6.3.13 babel-preset-es2015#6.3.13 browserify#12.0.1
react-dom#0.14.3 watchify#3.6.1
npm WARN package.json ReactJS_BluePrints_Scaffold#1.0.0 No repository field.
npm http GET https://registry.npmjs.org/babelify/7.2.0
npm http GET https://registry.npmjs.org/browserify-middleware/7.0.0
npm http GET https://registry.npmjs.org/express/4.13.3
npm http GET https://registry.npmjs.org/react/0.14.3
npm http GET https://registry.npmjs.org/reactify/1.1.1
npm http GET https://registry.npmjs.org/browser-sync/2.10.0
npm http GET https://registry.npmjs.org/babel-preset-react/6.3.13
npm http GET https://registry.npmjs.org/babel-preset-es2015/6.3.13
npm http GET https://registry.npmjs.org/browserify/12.0.1
npm http GET https://registry.npmjs.org/react-dom/0.14.3
npm http GET https://registry.npmjs.org/watchify/3.6.1
npm http GET https://registry.npmjs.org/%E2%80%93-save
npm http 304 https://registry.npmjs.org/react/0.14.3
npm http 304 https://registry.npmjs.org/express/4.13.3
npm http 304 https://registry.npmjs.org/browserify-middleware/7.0.0
npm http 304 https://registry.npmjs.org/babelify/7.2.0
npm http 304 https://registry.npmjs.org/reactify/1.1.1
npm http 304 https://registry.npmjs.org/browser-sync/2.10.0
npm http 304 https://registry.npmjs.org/babel-preset-react/6.3.13
npm http 304 https://registry.npmjs.org/babel-preset-es2015/6.3.13
npm http 304 https://registry.npmjs.org/browserify/12.0.1
npm http 304 https://registry.npmjs.org/react-dom/0.14.3
npm http 304 https://registry.npmjs.org/watchify/3.6.1
npm http 404 https://registry.npmjs.org/%E2%80%93-save
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 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "–-save" "babelify#7.2.0" "browserify-middleware#7.0.0" "express#4.13.3" "react#0.14.3" "reactify#1.1.1" "browser-sync#2.10.0" "babel-preset-react#6.3.13" "babel-preset-es2015#6.3.13" "browserify#12.0.1" "react-dom#0.14.3" "watchify#3.6.1"
npm ERR! cwd /home/user/reactapp
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/user/reactapp/npm-debug.log
npm ERR! not ok code 0
You already got an approved answer but I wanted to add that I ran into a similar issue, receiving the frustrating message (I'm running on Windows):
TypeError: Cannot read property 'latest' of undefined
I tried fixing it by deleting the cache:
npm cache clean
Tried recloning repositories
My issue ended up being that I had two installations of nodejs. I don't know why this caused the error but after I uninstalled both versions and installed a new version, plus then deleted the npm in my appdata, only then did npm work properly again.
The save flag should be --save, not –- save. As the flag is malformed, npm will search for a package named –- (or for –-save since your last edit) .
Try this:
npm install --save babelify#7.2.0 browserify-middleware#7.0.0 express#4.13.3 react#0.14.3 reactify#1.1.1 browser-sync#2.10.0 babel-preset-react#6.3.13 babel-preset-es2015#6.3.13 browserify#12.0.1 react-dom#0.14.3 watchify#3.6.1
Well, I had this same problem and I solved it by installing the latest version of NodeJS. Probably the error is internal in Node.
I couldnt able to install redis proxy in my Mac Mini. I am getting below error message.
server:$ sudo npm install -g redis-proxy
npm http GET https://registry.npmjs.org/redis-proxy
npm http GET https://registry.npmjs.org/redis-proxy
npm http GET https://registry.npmjs.org/redis-proxy
npm ERR! Error: socket hang up
npm ERR! at SecurePair.error (tls.js:927:23)
npm ERR! at EncryptedStream.CryptoStream.done (tls.js:625:22)
npm ERR! at CleartextStream.read as _read
npm ERR! at CleartextStream.Readable.read (stream_readable.js:304:10)
npm ERR! at EncryptedStream.onCryptoStreamFinish (tls.js:292:47)
npm ERR! at EncryptedStream.g (events.js:175:14)
npm ERR! at EncryptedStream.EventEmitter.emit (events.js:117:20)
npm ERR! at finishMaybe (streamwritable.js:344:12)
npm ERR! at endWritable (streamwritable.js:351:3)
npm ERR! at EncryptedStream.Writable.end (streamwritable.js:329:5)
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
Want to change the npmjs url to GET http://registry.npmjs.org/redis-proxy