Cannot installing node-sass --save-dev / npm ERR! network - node.js

;)
After installing nodeJs, creating package.json (npm init) I wanted to install node-sass (npm install node-sass --save-dev) and an error occurred.
"This is a problem related to network connectivity. In most cases you are behind a proxy, please make sure that the 'proxy' config is set properly".
My proxy=null. I tried this command with -d, tried to clean cache, update npm and nothing. All the time the same error. Some idea? :)
here is the error response:
Natours ania$ npm install node-sass --save-dev
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz failed, reason: read ETIMEDOUT
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! /Users/Ania/.npm/_logs/2018-05-16T17_07_41_343Z-debug.log

Related

How to fix npm install and npm run dev error in Laravel

How can I fix an npm install and a npm run dev error in Laravel?
F:\new xampp\htdocs\img\hos-sps>npm install npm ERR! code
ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT npm ERR! network
Invalid response body while trying to fetch
https://registry.npmjs.org/#babel%2fhelper-plugin-utils: Socket
timeout 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\sammy
waweru\AppData\Local\npm-cache_logs\2022-02-10T17_32_47_296Z-debug-0.log
F:\new xampp\htdocs\img\hos-sps>npm help config
Try to clean the cache and run your npm install and dev commands.
npm cache clean --force
The above will delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption.

problem with node sass npm package node modules

npm package installation problem from command line, general problem on several packages since the node sass installation attempt which did not install what to do now it blocks all package installations what happend??
i have uninstalled and reinstalled node it is still blocking npm, moreover it is very slow to give me the errors. something has happened and i don't know what.
Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.
Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
PS C:\Users\opsty> npm -v
6.14.8
PS C:\Users\opsty> npm install --global --production windows-build-tools
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/windows-build-tools failed, reason: connect ETIMEDOUT 93.184.216.34:8080
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\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_31_04_559Z-debug.log
PS C:\Users\opsty> npm install -g #angular/cli
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/#angular%2fcli failed, reason: connect ETIMEDOUT 93.184.216.34:8080
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/#angular/cli/-/cli-10.2.0.tgz failed, reason: connect ETIMEDOUT 93.184.216.34:8080
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\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_37_03_772Z-debug.log
PS C:\Users\opsty> npm install node-gyp
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/node-gyp failed, reason: connect ETIMEDOUT 93.184.216.34:8080
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz failed, reason: connect ETIMEDOUT 93.184.216.34:8080
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\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_43_11_642Z-debug.log
PS C:\Users\opsty>
This does not look like node or npm issue. Could it be your DNS server misbehaving?
In other words, when you see errors like this firstly you would need to make sure your computer can talk to the https://registry.npmjs.org/ DNS name and 93.184.216.34 IP address.
problem solved so I did a npm config delete proxy npm config delete htpp-proxy there are several methods
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
npm config rm proxy
npm config rm https-proxy
npm config delete http-proxy
npm config delete https-proxy

NPM proxy problem when trying to install Vue CLI globally

I've tried to install Vue Cli globally, but doesn't install and also shows me some errors which is proxy settings. I've manually/cmd added some values on .npmrc file like below but it does not works for me.
npm config set proxy http://proxy.mycompany.com:8080
npm config set https-proxy http://proxy.mycompany.com:8080
The errors are below:
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/#vue%2fcli failed, reason: connect ETIMEDOUT 104.16.20.35:80
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\Viking_Castle\AppData\Roaming\npm-cache\_logs\2020-08-10T15_30_01_181Z-debug.log
Try removing proxies with the following command the try to install it
npm config rm proxy
npm config rm https-proxy
I had similar error
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://cdn.npm.taobao.org/%40babel/plugin-transform-unicode-escapes/-/%40babel/plugin-transform-unicode-escapes-7.12.1.tgz failed, reason: connect ETIMEDOUT 129.227.206.207: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\Pradeep S\AppData\Roaming\npm-cache\_logs\2020-11-27T19_57_22_034Z-debug.log ERROR command failed: npm install --loglevel error
Resolved by changing Wifi connection to laptop. Used mobile hotspot to connect and tried creating project from vue cli again, and it worked this time

NPM does not allow installation of any packages like react

I have been trying to install react on my PC. The problem is that it always shows the following error:
D:\React JS>npm install react
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/react failed, reason getaddrinfo ENOTFOUND host
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\Idea1\AppData\Roaming\npm-cache\_logs\2020-04-16T12_57_52_202Z-debug.log
This is the issue, when I tried installing react or any other package.
try:
npm config delete proxy
then install command

error installing 'create-react-native-app' npm

I am getting this issue while installing the create-react-native-app app
npm install -g create-react-native-app
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/create-react-native-app failed, reason: getaddrinfo ENOTFOUND genproxy genproxy:8080
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\krishna\AppData\Roaming\npm-cache\_logs\2017-11-14T08_10_48_970Z-debug.log
I have tried removing any proxy that I was using still getting the same error.
C:\
λ npm -v
5.5.1
C:\
node -v
v8.9.1
Let me know if more info is needed.
Thanks
It was getting a wrong proxy which I didn't realised earlier.
I was under a corporate network so added the full name of the proxy 'genproxy.corporatename.com:8080' in place of 'genproxy:8080'.
Working fine!!

Resources