title: NPM while starting it shows Cannot find module 'safe-buffer'
body: <p>I am trying to create a Node Restful API service, but npm is giving me an error while starting. In command prompt I have typed the following :</p>
  
  <pre><code>D:\xampp\htdocs\todoListApi&gt;npm run start
  </code></pre>
  
  <blockquote>
    <p>todolistapi@1.0.0 start D:\xampp\htdocs\todoListApi</p>
    
    <p>nodemon server.js</p>
  </blockquote>
  
  <p>It shows following error </p>
  
  <pre><code>[nodemon] 1.17.3
  [nodemon] to restart at any time, enter `rs`
  [nodemon] watching: *.*
  [nodemon] starting `node server.js`
  internal/modules/cjs/loader.js:550
      throw err;
      ^
  
  Error: Cannot find module 'safe-buffer'
  at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
  at Function.Module._load (internal/modules/cjs/loader.js:475:25)
  at Module.require (internal/modules/cjs/loader.js:598:17)
  at require (internal/modules/cjs/helpers.js:11:18)
  
  
       at Object.&lt;anonymous&gt; (D:\xampp\htdocs\todoListApi\node_modules\readable-str
      eam\lib\_stream_readable.js:55:14)
  
      at Module._compile (internal/modules/cjs/loader.js:654:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
      at Module.load (internal/modules/cjs/loader.js:566:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
      at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! todolistapi@1.0.0 start: `nodemon server.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the todolistapi@1.0.0 start script.
  npm ERR! This is probably not a problem with npm. There is likely additional log
  ging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs\2018-04-20T06_50_15_
  033Z-debug.log
  
  D:\xampp\htdocs\todoListApi&gt;npm install mongoose --sav
  npm WARN todolistapi@1.0.0 No repository field.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fse
  vents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
  1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
  </code></pre>
  
  <p>Instead it should start npm and show result as </p>
  
  <blockquote>
    <p>todo list RESTful API server started on: 3000</p>
  </blockquote>
  
  <p>Please guide me on how I can overcome this.</p>