throw e; // process.nextTick error, or ‘error’ event on first tick 21.04.12

  • Mac OS X
  • Comments Off on throw e; // process.nextTick error, or ‘error’ event on first tick
  • 0

  • node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick

    Error: No such module
    at Object. (/usr/lib/node_modules/npm/lib/utils/config-defs.js:5:21)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.
    (/usr/lib/node_modules/npm/lib/utils/ini.js:43:18)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)

    Solution :

    Remove the thing in /usr, so that your computer will see the one in /usr/local.

    sudo rm -rf /usr/{bin,lib/node_modules,share/man/*}/npm*
    hash -r

    Backup crontab 15.04.12

  • Ubuntu Server
  • Comments Off on Backup crontab
  • 0
  • How to copy or backup the crontab file?

    crontab -l > $(date +%Y%m%d).crontab

    Start, Stop & Restart OpenSSH Server 04.03.12

  • Ubuntu Server
  • Comments Off on Start, Stop & Restart OpenSSH Server
  • 0
  • $ sudo /etc/init.d/ssh start
    $ sudo /etc/init.d/ssh stop
    $ sudo /etc/init.d/ssh restart

    $ sudo service ssh start
    $ sudo service ssh stop
    $ sudo service ssh restart

    warning: setlocale: LC_CTYPE: cannot change locale (UTF-8) 04.03.12

    I was getting the following message when loggin through SSH :

    warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

    It complain about the locale variables not being set.

    To fix this, simply add the following to ~/.bash_profile:

    export LC_CTYPE=”en_US.UTF-8″

    [emerg] unknown “https” variable 04.03.12

  • Nginx
  • Comments Off on [emerg] unknown “https” variable
  • 0
  • Error :

    Starting nginx: nginx: [emerg] unknown “https” variable
    nginx: configuration file /etc/nginx/nginx.conf test failed

    Solution :

    Edit this file /etc/nginx/fastcgi_params

    Comment out this line

    # fastcgi_param HTTPS $server_https;