hey i was installing angular and waiting 11 hours and then internet slow down and i got an error
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/resolve/-/resolve-
1.8.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network
settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2018-07-
06T21_01_53_610Z-debug.log
what should i do??How to complete the installation successfully?
Update node and npm
Run PowerShell as Administrator
npm install -g npm-windows-upgrade
npm-windows-upgrade
Then try angular cli
npm install -g #angular/cli
Related
I'm getting an error while trying to globally install electron, I'm not sure why.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! HTTPError: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v19.0.9/electron-v19.0.9-darwin-ia32.zip
npm ERR! at EventEmitter.<anonymous> (/usr/local/lib/node_modules/electron/node_modules/got/source/as-stream.js:35:24)
npm ERR! at EventEmitter.emit (node:events:390:28)
npm ERR! at module.exports (/usr/local/lib/node_modules/electron/node_modules/got/source/get-response.js:22:10)
npm ERR! at ClientRequest.handleResponse (/usr/local/lib/node_modules/electron/node_modules/got/source/request-as-event-emitter.js:155:5)
npm ERR! at Object.onceWrapper (node:events:510:26)
npm ERR! at ClientRequest.emit (node:events:402:35)
npm ERR! at ClientRequest.origin.emit (/usr/local/lib/node_modules/electron/node_modules/#szmarczak/http-timer/source/index.js:37:11)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:623:27)
npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! at TLSSocket.socketOnData (node:_http_client:487:22)
npm ERR! A complete log of this run can be found in:
For some reason I don't know, your npm tries to install Electron with the ia32 architecture, resulting in a downloadable zip file which is not provided by the Electron maintainers. That's why you're getting a 404 HTTP status code.
Going back in Electron's releases page, I cannot seem to find any darwin-ia32 assets (darwin is the codeame for macOS).
You can try forcing npm to install the appropriate architecture using
npm install --arch=x64 electron
as suggested in Electron's installation guide.
I get an errno ENOTFOUND error when trying to install cordova via npm.
This is the command I'm using:
sena$ sudo npm install -g cordova npm
And this is the response:
ERR! Darwin 14.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm ERR! node v4.1.0 npm ERR! npm v2.14.3 npm ERR! code ENOTFOUND npm
ERR! errno ENOTFOUND npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org
registry.npmjs.org:443 npm ERR! network This is most likely not a
problem with npm itself npm ERR! network and is related to network
connectivity. npm ERR! network In most cases you are behind a proxy or
have bad network settings. npm ERR! network npm ERR! network If you
are behind a proxy, please make sure that the npm ERR! network 'proxy'
config is set properly. See: 'npm help config'
Sails.js will not install, but just to make sure npm is working I installed grunt
npm install -g grunt-cli and it installed correctly.
But when I run npm install -g sails I get an error.
Command prompt error:
`sails#0.11.0 preinstall C:\Users\User\AppData\Roaming\npm\node_modules\sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation - Error
Unable to check your npm-version
Please reinstall npm to use Sails.js
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-
cli.js" "-g" "install" "sails"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! sails#0.11.0 preinstall: node ./lib/preinstall_npmcheck.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sails#0.11.0 preinstall script 'node ./lib/preinstall_npmcheck.js'.
npm ERR! This is most likely a problem with the sails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/preinstall_npmcheck.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sails
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log`
npm-debug.log:
https://gist.github.com/anonymous/c850ac8c71e0410db020
I got the same errors.
npm -g install sails
But it worked when I ran command line as administrator.
I solved this by running npm install -g sails --ignore-scripts.
The only thing I can think of is for some reason I don't have ./lib/preinstall_npmcheck.js file and it is trying to run it, so by ignoring it I don't get the error, hence the successful install.
I still don't understand why, but I hope this helps someone.
Good day to all:
I had these error while installing JShint and CSS Linter thru my Vagrant environment. I'm using Vagrant in Windows and Ubuntu is on my vagrant box.
I already installed npm and nodejs, tried lot of updates way but no luck.
Maybe others can shed a light.
Here is the error.
vagrant#precise32:~$ npm install jshint
vagrant#precise32:~$ npm install jshint
npm http GET https://registry.npmjs.org/jshint
npm ERR! Error: failed to fetch from registry: jshint
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-cient/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:
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-pae
npm ERR! command "node" "/usr/bin/npm" "install" "jshint"
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: jshint
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Please respond with your npm --version and node --version. I suspect either out of data npm/nodejs libraries.
In either case, try this:
npm config set registry https://registry.npmjs.org/
Closed bug here: https://github.com/npm/npm/issues/2119
EDIT: Perhaps this is an issue with Windows host to a Ubuntu VM:
https://github.com/npm/npm/issues/7308
npm install jshint --no-bin-link If it installs, then your filesystem doesn't support links and each time you run npm install, you will need to append this flag. If you use this flag, you can't install globally with the npm install -g flag.
npm may not be detecting your host filesystem since npm is run on Ubuntu VM. You need to allow symlinks on Windows host in the Vagrantfile:
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
end
If you want to just bypass setting up Vagrantfile and ok with not installing global binaries (the -g flag), which I highly suggest not to, then alias your npm install --no-bin-links:
echo "alias npm='npm --no-bin-links'" >> /home/vagrant/.bashrc
I'm trying to install grunt on a windows machine that is behind a corporate proxy.
I have installed node and npm, I can see the versions of both of them from the command line. But when I try to install grunt as is described in the grunt site http://gruntjs.com/getting-started but I get the following errors and I can't figure it out how to solve it.
Here is the Error message I get:
npm.cmd: npm ERR! Error: CERT_UNTRUSTED
At line:1 char:4 + npm <<<< install -g grunt-cli + CategoryInfo : NotSpecified:
(npm ERR! Error: CERT_UNTRUSTED:String) [], RemoteException + FullyQualifiedErrorId:
NativeCommandError
npm ERR! at SecurePair.<anonymous> (tls.js:1367:32), npm ERR! at SecurePair.emit (events.js:92:17), npm ERR! at SecurePair.maybeInitFinished (tls.js:979:10), npm ERR! at CleartextStream.read [as _read] (tls.js:471:13), npm ERR! at CleartextStream.Readable.read (_stream_readable.js:340:10), npm ERR! at EncryptedStream.write [as _write] (tls.js:368:25)
npm ERR! at doWrite (_stream_writable.js:225:10), npm ERR! at writeOrBuffer (_stream_writable.js:215:5), npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:182:11), npm ERR! at at write (_stream_readable.js:601:24), 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 Windows_NT 6.1.7601, npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR!cwd C:\Dev\gruntTest2, npm ERR! node -v v0.10.31, npm ERR! npm -v 1.4.23
I am using visual studio 2013. I have tried installing direct from the command line and from the Package Manager Console, and basically I get the same error.
Any suggestions how to solve this?
Thanks in advance.
In order to be able to install grunt or anything else from npm, first I need to use the following command:
npm config set strict-ssl false
I found this answer in different places around stackoverflow and other sites. But I used as a reference Ramesh answer. I also include the proxy address of the network, but that didn't work until I change strict-ssl configuration.
You could run a proxy on your own system ( fiddler can function as a proxy)
and point your browser proxy settings to this proxy.
Because fiddler is started under your credentials, proxy authentication is no longer a problem.
Remember to restart programs after you change the proxy settings