Categories
JavaScript Answers

How to set npm credentials using `npm login` without reading from stdin with JavaScript?

Spread the love

To set npm credentials using npm login without reading from stdin with JavaScript, we run npm set.

For instance, we run

npm set //<registry>/:_authToken $TOKEN

to run npm set to set the authToken to the $TOKEN environment variable value.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *