npm set registry https://registry.npmjs.org code example
Example: npm install custom registry
npm config set registry <registry url>
npm install --registry=<registry url>
npm config set registry <registry url>
npm install --registry=<registry url>