nodejs and npm in jailkit on ispconfig3

Discussion in 'Installation/Configuration' started by destine, Nov 1, 2017.

  1. destine

    destine Member

    Hi Guys,
    I've some problems with npm in jailkit. Below is my configuration from /etc/jailkit/jk_init.ini

    [nodejs]
    comment = nodejs
    directories = /usr/lib/node_modules/
    executables = /usr/bin/nodejs, /usr/bin/npm, /usr/bin/node

    Now, when I'm logged in as jailed user and checking versions of nodejs and npm I'm getting results as below:
    node -v
    v6.11.5
    nodejs -v
    v6.11.5
    npm -v
    5.5.1
    It looks that everything is ok and should work but when I'm trying for example install some packages such us gulp or enything else I'm always getting:

    npm install gulp
    npm ERR! Cannot read property 'length' of undefined
    npm ERR! A complete log of this run can be found in:
    npm ERR! xxxxxxx/.npm/_logs/2017-11-01T16_31_31_916Z-debug.log

    content of above debug.log is:

    0 info it worked if it ends with ok
    1 verbose cli [ 'node', '/usr/bin/npm', 'install', 'gulp' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose node symlink /usr/bin/node
    5 verbose config Skipping project config: /home/xxxxxxxxx/.npmrc. (matches userconfig)
    6 verbose npm-session a8cc5ee570e152f3
    7 verbose stack TypeError: Cannot read property 'length' of undefined
    7 verbose stack at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:5:61)
    7 verbose stack at Module._compile (module.js:570:32)
    7 verbose stack at Object.Module._extensions..js (module.js:579:10)
    7 verbose stack at Module.load (module.js:487:32)
    7 verbose stack at tryModuleLoad (module.js:446:12)
    7 verbose stack at Function.Module._load (module.js:438:3)
    7 verbose stack at Module.require (module.js:497:17)
    7 verbose stack at require (internal/module.js:20:19)
    7 verbose stack at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/worker-farm/lib/index.js:3:14)
    7 verbose stack at Module._compile (module.js:570:32)
    7 verbose stack at Object.Module._extensions..js (module.js:579:10)
    7 verbose stack at Module.load (module.js:487:32)
    7 verbose stack at tryModuleLoad (module.js:446:12)
    7 verbose stack at Function.Module._load (module.js:438:3)
    7 verbose stack at Module.require (module.js:497:17)
    7 verbose stack at require (internal/module.js:20:19)
    8 verbose cwd /home/xxxxxxxxx
    9 verbose Linux 3.13.0-85-generic
    10 verbose argv "node" "/usr/bin/npm" "install" "gulp"
    11 verbose node v6.11.5
    12 verbose npm v5.5.1
    13 error Cannot read property 'length' of undefined
    14 verbose exit [ 1, true ]

    Can anybody help me with this issiue ?
    Thanx in advanced.
     

Share This Page