title: error while installing pm2 - node js
body: <p>i am trying to install pm2 (<a href="https://github.com/Unitech/pm2" rel="nofollow">https://github.com/Unitech/pm2</a>)</p>
  
  <p>i get this error : <br></p>
  
  <pre><code>D:\_Work&gt;npm install pm2
   -g --unsafe-perm
  npm WARN `git config --get remote.origin.url` returned wrong result (http://ikt.
  pm2.io/ikt.git) undefined
  npm WARN `git config --get remote.origin.url` returned wrong result (http://ikt.
  pm2.io/ikt.git) undefined
  npm ERR! git clone http://ikt.pm2.io/ikt.git undefined
  npm ERR! git clone http://ikt.pm2.io/ikt.git undefined
  npm WARN optional dep failed, continuing ikt@git+http://ikt.pm2.io/ikt.git#maste
  r
  npm WARN optional dep failed, continuing fsevents@0.3.5
  C:\Users\user\AppData\Roaming\npm\pm2 -&gt; C:\Users\user\AppData\Roaming
  \npm\node_modules\pm2\bin\pm2
  pm2@0.12.7 C:\Users\user\AppData\Roaming\npm\node_modules\pm2
  ├── json-stringify-safe@5.0.0
  ├── cli-table@0.3.1
  ├── eventemitter2@0.4.14
  ├── commander@2.6.0
  ├── pidusage@0.1.1
  ├── cron@1.0.5
  ├── async@0.9.0
  ├── isbinaryfile@2.0.3
  ├── vizion@0.2.3
  ├── colors@1.0.3
  ├── shelljs@0.3.0
  ├── pmx@0.3.5
  ├── observe-js@0.4.2
  ├── debug@2.1.0 (ms@0.6.2)
  ├── pm2-deploy@0.1.2 (tv4@1.0.18)
  ├── pm2-multimeter@0.1.2 (charm@0.1.2)
  ├── pm2-axon-rpc@0.3.6 (commander@1.0.5)
  ├── moment@2.9.0
  ├── nssocket@0.5.3 (lazy@1.0.11)
  ├── coffee-script@1.8.0 (mkdirp@0.3.5)
  ├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0
  .2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
  ├── chokidar@0.12.6 (async-each@0.1.6, readdirp@1.3.0)
  ├── pm2-axon@2.0.8 (amp-message@0.1.2, escape-regexp@0.0.1, amp@0.3.1, configura
  ble@0.0.1, debug@2.0.0)
  └── pm2-logs@0.1.1 (blessed@0.0.36, chalk@0.4.0, pm2-interface@1.1.0)
  
  D:\_Work&gt;pm2
  fs.js:751
    return binding.mkdir(pathModule._makeLong(path),
                   ^
  Error: ENOENT, no such file or directory 'D:\Users\user\.pm2'
      at Error (native)
      at Object.fs.mkdirSync (fs.js:751:18)
      at Object.CLI.pm2Init (C:\Users\user\AppData\Roaming\npm\node_modules\p
  m2\lib\CLI.js:37:8)
      at Object.&lt;anonymous&gt; (C:\Users\user\AppData\Roaming\npm\node_modules\p
  m2\bin\pm2:20:5)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
      at startup (node.js:129:16)
  </code></pre>
  
  <p>I am having Windows 7 and i tried this by Run as Administrator as well.<br>
  I want to install a js file as a windows service or something else so that it runs forever.</p>
  
  <p>Kindly assist</p>