title: How to set npm credentials using `npm login` without reading from stdin?
body: <p>I'm trying to automate <code>npm publish</code> inside a Docker container, but I receive an error when the <code>npm login</code> command tries to read the username and email:</p>
  <pre class="lang-sh prettyprint-override"><code>npm login &lt;&lt; EOF
  username
  password
  email
  EOF
  </code></pre>
  <p>It works in a Bash terminal, but in a container (without <code>stdin</code>) it shows error:</p>
  <pre class="lang-sh prettyprint-override"><code>Username: Password: npm ERR! cb() never called!
  npm ERR! not ok code 0
  </code></pre>
  <p>According to <a href="https://www.npmjs.org/doc/cli/npm-adduser.html" rel="noreferrer">npm-adduser</a>:</p>
  <blockquote>
  <p>The username, password, and email are read in from prompts.</p>
  </blockquote>
  <p>How can I run <code>npm login</code> without using <code>stdin</code>?</p>