title: npm install with --save does not save in package.json
body: <p>I have <code>npm-5.3.0</code> installed on my arch Linux.</p>
  
  <p>I create a new project with <code>npm init</code> and fill in the details. This creates a package.json file with the details.</p>
  
  <p>After that when I do <code>npm install &lt;package&gt; --save</code>, the file <code>package.json</code> does not change, and there is no entry for dependencies in the file. I had installed the package globally previously if that matters.</p>