{"id":14132,"library":"tls-test","title":"TLS Test for npm","description":"The `tls-test` package, currently at version `0.0.1`, is a specialized diagnostic utility designed to verify that a user's Node.js and npm client environment supports TLS 1.2 or higher for connecting to the public npm registry. It was primarily introduced as a compatibility checker ahead of npm's enforcement of TLS 1.2 on October 4, 2021. This package is not a general-purpose library, nor does it have a regular release cadence, serving instead as a static test. Its key differentiator is providing a direct, isolated test against an HTTPS endpoint already enforcing TLS 1.2, allowing users to confirm their setup without waiting for the full registry enforcement. While the enforcement date has passed, it remains valuable for troubleshooting connectivity issues on legacy systems, custom Node.js builds, or restrictive network environments where TLS compatibility might still be a concern.","status":"maintenance","version":"0.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/npm/tls-test","tags":["javascript"],"install":[{"cmd":"npm install tls-test","lang":"bash","label":"npm"},{"cmd":"yarn add tls-test","lang":"bash","label":"yarn"},{"cmd":"pnpm add tls-test","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz","lang":"javascript","description":"Installs the `tls-test` package globally to confirm your npm client and Node.js environment support TLS 1.2 or higher."},"warnings":[{"fix":"Upgrade to a currently supported version of Node.js (which includes TLS 1.2+ support) and the latest version of npm (v7+).","message":"The public npm registry enforced a minimum of TLS 1.2 for all connections starting October 4, 2021. Older Node.js or npm versions, or custom environments not supporting TLS 1.2, will fail to connect.","severity":"breaking","affected_versions":"<=Node.js 0.10.0, npm 6 and older versions with TLS issues"},{"fix":"Verify Node.js is a supported version (v0.10.0+ for TLS 1.2) and npm is updated. Consult Node.js and npm documentation for upgrade paths.","message":"If `npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz` completes without the success message, your environment likely lacks TLS 1.2 support. A successful installation should print: 'Hello! The tls-test package was successfully downloaded and installed. Congratulations! Your package manager appears to support TLS 1.2.'","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update your npm registry configuration to use `https://` by running `npm config set registry https://registry.npmjs.org/` to ensure secure connections and avoid warnings.","message":"Using `http://` for the npm registry in `.npmrc` will trigger warnings about plaintext connections, even if your client supports TLS 1.2 via redirects. This can be confusing during brownouts or testing.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.0.1':13 '1.2':33,58,102 '2021':62 '4':61 'ahead':51 'allow':103 'alreadi':99 'build':134 'cadenc':79 'checker':50 'client':29 'compat':49,141 'concern':146 'confirm':106 'connect':37,127 'current':10 'custom':132 'date':119 'design':19 'diagnost':17 'differenti':88 'direct':92 'endpoint':98 'enforc':55,100,115,118 'environ':30,138 'full':113 'general':69 'general-purpos':68 'higher':35 'https':97 'instead':81 'introduc':46 'isol':93 'issu':128 'javascript':147 'key':87 'legaci':130 'librari':71 'might':142 'network':137 'node.js':26,133 'npm':4,28,41,53 'octob':60 'packag':9,64 'pass':121 'primarili':45 'provid':90 'public':40 'purpos':70 'registri':42,114 'regular':77 'releas':78 'remain':123 'restrict':136 'serv':80 'setup':108 'special':16 'static':84 'still':143 'support':31 'system':131 'test':2,8,85,94 'tls':1,7,32,57,101,140 'tls-test':6 'troubleshoot':126 'user':24,104 'util':18 'valuabl':124 'verifi':21 'version':12 'wait':110 'without':109","created_at":"2026-04-20T01:58:06.241904+00:00","updated_at":"2026-04-20T01:58:06.241904+00:00","problems":[{"fix":"Run `npm config set registry https://registry.npmjs.org/` to update your registry protocol.","cause":"Your npm configuration is set to use an `http://` registry URL instead of `https://`.","error":"npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect."},{"fix":"Consult your IT department to configure npm to trust the corporate root certificate, or set `npm config set strict-ssl false` (use with caution, as this disables certificate validation).","cause":"Often indicates an issue with corporate proxies or firewalls intercepting HTTPS traffic and re-signing certificates with an untrusted root.","error":"Error: unable to get local issuer certificate"},{"fix":"Ensure your Node.js and npm are up-to-date. Check network connectivity, VPNs, and corporate proxy settings. Re-run the `tls-test` command to diagnose the TLS layer specifically.","cause":"This error can sometimes manifest during package downloads when the underlying network connection or TLS negotiation fails unexpectedly, leading to incomplete data.","error":"npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! Z_BUF_ERROR: unexpected end of file"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/npm/tls-test","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/tls-test","openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","testing","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-19","next_check":"2026-07-18","install_tag":null}}