I have a serious problem. I tried to install ionic, cordova, angular, react-native-cli, https-status-error and other packages and it always returns:
npm ERR! code E418
npm ERR! 418 I'm a teapot: ionic @ latest
Please note that it may be wrong and I do not understand what is happening. It was fine until 3 days ago.
So, post may 29th '18, this is the common error being faced worldwide by devs working behind corporate proxies. The following tweak fixed the issue for me:
Go to your .npmrc file.
you'll have the following similar content in the file depending upon the configs you are setting up-
strict-ssl=false
registry=http://registry.npmjs.org/
python=C:/Python27/python.exe
msvs_version=2015
http-proxy=<WHATEVER-PROXY-YOU-USUALLY-ADD>:8000
Note: Ignore the extra configs like python variable path.
Update the registry link to 'https://registry.npmjs.org/'. So your file would look like this now-
strict-ssl=false
registry=https://registry.npmjs.org/
python=C:/Python27/python.exe
msvs_version=2015
http-proxy=<WHATEVER-PROXY-YOU-USUALLY-ADD>:8000
And Viola! you are all set to fire your npm install commands :)
Work for me!
If you set proxy should be unset.
npm config delete proxy
npm config delete https-proxy
Solution resolve npm ^___^
npm cache clean --force
npm cache verify
I had the very same issue and managed to fix it. In my case, I initially had the value of "http://registry.npmjs.org/" and changed it to "https". Below are the set of commands I ran:
npm config set registry https://registry.npmjs.org/
npm cache clean --force
npm cache verify
npm install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With