Re: [nodejs] require('os').homedir() error on linux

2016-07-01 Thread Ben Noordhuis
On Fri, Jul 1, 2016 at 9:24 AM, Marco Stolle wrote: > Hello, > > i'm testing a library where i have to run the script with sudo, thats when i > get an error on the line > > var homedir =require('os').homedir() > > (i also get this error in a file with only this line, it's

Re: [nodejs] require('os').homedir() error on linux

2016-07-01 Thread Witold Szczerba
Just checked on my Ubuntu 14.04: [ witoldsz@svp:~ ]$ sudo su - root@svp:~# /opt/node/bin/node --version v4.1.1 root@svp:~# /opt/node/bin/node > require('os').homedir() '/root' Seems to be working just fine. On 7/1/16, Marco Stolle wrote: > Hello, > > i'm testing a

[nodejs] require('os').homedir() error on linux

2016-07-01 Thread Marco Stolle
Hello, i'm testing a library where i have to run the script with sudo, thats when i get an error on the line var homedir =require('os').homedir() (i also get this error in a file with only this line, it's unrelated to the library) this results in testhomedir.js:1 quire, module,