title: Setup nodejs and npm within Jailkit
body: <p>I am using jailkit on my server, and I want to add support for nodejs and npm inside the chrooted environment. I don't know if I'm missing some directory that I need to link into my jail, or some lib or binary, but I'm quite lost. I added the following to jk_init.ini:</p>
  
  <pre><code>[node]
  comment = NodeJS
  executables = /usr/bin/npm, /usr/bin/node, /usr/bin/nodejs
  directories = /usr/local/lib/node_modules
  </code></pre>
  
  <p>If I run <code>npm ls</code> from my root user, it runs fine. If I try to run it from my jailed environment, I get this error:</p>
  
  <pre><code>npm ERR! Linux 3.16.0-28-generic
  npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "ls"
  npm ERR! node v4.2.6
  npm ERR! npm  v3.5.2
  npm ERR! code MODULE_NOT_FOUND
  
  npm ERR! Cannot find module 'ansi'
  npm ERR! 
  npm ERR! If you need help, you may report this error at:
  npm ERR!     &lt;https://github.com/npm/npm/issues&gt;
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     /web/npm-debug.log
  </code></pre>
  
  <p>The log files has this:</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'ls' ]
  2 info using npm@3.5.2
  3 info using node@v4.2.6
  4 verbose stack Error: Cannot find module 'ansi'
  4 verbose stack     at Function.Module._resolveFilename (module.js:326:15)
  4 verbose stack     at Function.Module._load (module.js:277:25)
  4 verbose stack     at Module.require (module.js:354:17)
  4 verbose stack     at require (internal/module.js:12:17)
  4 verbose stack     at Object.&lt;anonymous&gt; (/usr/share/npm/lib/ls.js:15:13)
  4 verbose stack     at Module._compile (module.js:410:26)
  4 verbose stack     at Object.Module._extensions..js (module.js:417:10)
  4 verbose stack     at Module.load (module.js:344:32)
  4 verbose stack     at Function.Module._load (module.js:301:12)
  4 verbose stack     at Module.require (module.js:354:17)
  5 verbose cwd /web
  6 error Linux 3.16.0-28-generic
  7 error argv "/usr/bin/nodejs" "/usr/bin/npm" "ls"
  8 error node v4.2.6
  9 error npm  v3.5.2
  10 error code MODULE_NOT_FOUND
  11 error Cannot find module 'ansi'
  12 error If you need help, you may report this error at:
  12 error     &lt;https://github.com/npm/npm/issues&gt;
  13 verbose exit [ 1, true ]
  </code></pre>
  
  <p>I'm running the latest version of Ubuntu with ISPConfig</p>