title: Npm ERR code EJSONPARSE - Failed to parse json
body: <p>So I was just about to setup this login form for my page using node.js
  I ran</p>
  
  <blockquote>
    <p>npm init</p>
  </blockquote>
  
  <p>and went trough the various steps to complete it. When I was all done with that, and the package.json file had been created I added these lines of code"</p>
  
  <pre><code> dependencies": {
           "bcryptjs": "*",
           "body-parser": "*",
           "connect-flash": "*",
           "cookie-parser": "^1.4.1",
           "express": "*",
           "express-handlebars": "*",
           "express-messages": "*",
           "express-session": "*",
           "express-validator": "*",
           "mongodb": "*",
           "mongoose": "*",
           "passport": "*",
           "passport-http": "*",
           "passport-local": "*"   }
  </code></pre>
  
  <p>I now ran the command</p>
  
  <blockquote>
    <p>npm install</p>
  </blockquote>
  
  <p>But ended up getting these ERRORS</p>
  
  <pre><code>npm ERR! file /Users/albingroen/Desktop/newProject/package.json
  npm ERR! code EJSONPARSE
  npm ERR! Failed to parse json
  npm ERR! Unexpected token '\n' at 26:5
  npm ERR!   }
  npm ERR!     ^
  npm ERR! File: /Users/albingroen/Desktop/newProject/package.json
  npm ERR! Failed to parse package.json data.
  npm ERR! package.json must be actual JSON, not just JavaScript.
  npm ERR!
  npm ERR! This is not a bug in npm.
  npm ERR! Tell the package author to fix their package.json file. JSON.parse
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/albingroen/.npm/_logs/2017-04-04T18_52_34_920Z-debug.log
  </code></pre>
  
  <p>I have tried following things:</p>
  
  <ul>
  <li><p>Cleaning the node cache</p></li>
  <li><p>Using different terminal</p></li>
  <li><p>Updating node.js</p></li>
  <li><p>Updating mongodb</p></li>
  <li><p>Changing location of package.json</p></li>
  <li><p>Running npm install without the added dependencies</p></li>
  <li><p>Deleting the nodemodules mapp </p></li>
  </ul>
  
  <p><strong>I really don't know what to do anymore. Somebody got an idea?</strong></p>