Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enforce npm to use https node repository

Lately i've had a weird issue where a lot of my dependencies now just don' t retrieve from the https based repository anymore, i'm not sure what happened, i've checked my config, this is what is has in it:

metrics-registry = "https://registry.npmjs.com/"
registry = "https://registry.npmjs.com/"
; metrics-registry = null (overridden)
; registry = "https://registry.npmjs.org/" (overridden)

I've downgrade to a few earlier versions and still no luck, thinking that a newer version is what's causing the issue, based on what I'd read here: https://github.com/npm/npm/issues/20434

I'd like to find out why this issue is happening and if other's are having similar issue and also how do i force npm to always use SSL based registry for retrieving dependencies.

like image 602
Beto Avatar asked Dec 05 '25 11:12

Beto


1 Answers

I solved a similar issue with:

npm config set registry https://registry.npmjs.org/
npm install
like image 51
Paco Abato Avatar answered Dec 08 '25 00:12

Paco Abato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!