You're encountering a network-related ENOTFOUND error when running npm install grunt-cli, likely due to proxy or DNS configuration issues.
npm config set proxy http://username:password@proxy-server:port npm config set https-proxy http://username:password@proxy-server:port
If no proxy is used, clear any lingering settings:
npm config delete proxy npm config delete https-proxy
Then check:
npm config list
Your error shows an attempt to access registry.npmjs.org:80 (HTTP). Force npm to use HTTPS:
npm config set registry https://registry.npmjs.org/
ipconfig /flushdns
Use Google DNS Update your DNS settings to use Google’s public DNS: -Preferred DNS: 8.8.8.8 -Alternate DNS: 8.8.4.4
Clear npm Cache
npm cache clean –force
These are very outdated and may have issues with current registry URLs and HTTPS handling.
Test It
npm install grunt-cli -g