title: SELF_SIGNED_CERT_IN_CHAIN error on Elastic Beanstalk for NodeJS
body: <p>I'm well aware of the root of this issue, as <code>npm</code> wrote on their blog: <a href="http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more" rel="nofollow">http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more</a></p>
  
  <p>The solution is to either:</p>
  
  <blockquote>
    <p>1) upgrade your version of npm</p>
    
    <p><code>npm install npm -g</code></p>
    
    <p>or</p>
    
    <p>2) tell your current version of npm to use known registrars  </p>
    
    <p><code>npm config set ca ""</code></p>
  </blockquote>
  
  <p>However, neither of these solution work on Elastic Beanstalk. <code>npm</code>is linked to the version of node installed (v0.10.10), and it is not possible to tell the current npm version to use known registrars.</p>
  
  <p>I run a 64-bit Amazon Linux instance for NodeJS</p>
  
  <p>Adding this command in <code>.ebextensions</code> does not help:</p>
  
  <pre><code>container_commands:
    01_npm-fix:
      command: /opt/elasticbeanstalk/node-install/node-v0.10.10-linux-x64/bin/npm config set ca ""
  </code></pre>
  
  <p>Anyone as figured out a solution for this?</p>