npm ERR! 503 Service Unavailable: npm@latest
snippet in javascript

npm ERR! 503 Service Unavailable: npm@latest

user521

first add this:
- npm config set registry http://registry.npmjs.org/

If your organization use proxy , add proxy :

- npm config set proxy "http://username:password@proxy-url:proxy-port"

- npm config set https-proxy "http://username:password@proxy-url:proxy-port"