Open itismohammadreza opened 4 years ago
Yes, even i m getting same problem since last two days ;( please help !
i have the same problem, and i can't solve it, maybe it is my slow internet connection, is there anyway to config the downloading for npm that it wont break even if i have slow internet?????
Hi All, I totally feel your pain, I have incredibly slow and crappy internet that has many times corrupted my npm cache.. So, I totally get the frustration you are all having... ;-(
Here are a couple ways to work around NPM issues that I use.
Try a npm cache verify
before you try a clean. Much better to have it detect a single bad package then have to clear all your packages... (This isn't foolproof; I've had it tell me everything is good; and it wasn't so you might still have to do a npm cache clean
)
Create a blank "temp" install directory and manually install the component it fails on: So in the above error stack if shows:
11159 verbose stack FetchError: Response timeout while trying to fetch https://registry.npmjs.com/pacote (over 30000ms)
This means that it failed to download pacote. So in your new "temp" folder, just do a:
npm i pacote@9.5.4
(Check the package.json typically for the version you need)
I would also install the optional dependencies it is looking for so that they are in your cache:
npm i @types/node@8.10.30
and
npm i typescript@3.3.4000
Then you can delete the "temp" folder; as you really only needed it to get npm to download and cache the modules it failed on...
Once you get npm to download it; it will then be in your cache... So then you can try the initial install again and see if you are good...
Hi I cant install nativescript-cli with npm when I run
npm install nativescript -g
. I dont know what is the reason. node --version => 12.16.2 npm --version => 6.14.4I tried : -delete cache folder and
npm cache clean --force
-npm config set registry http://registry.npmjs.com
-turn off anti malware but the issue is still unresolved.here is npm log file output
Please help !