npm install failed because of virtual directory

I'm trying to setup a new project which is a git repo stored on a virtual drive (wuala). Is it possible that this is not possible? Because when I try npm install I get the following error:

node.js:815
    var cwd = process.cwd();
                      ^
Error: ENOENT, no such file or directory
    at Function.startup.resolveArgv0 (node.js:815:23)
    at startup (node.js:58:13)
    at node.js:906:3

Ok, so the issue was node not finding the current working directory. I didn't know it was only a virtual directory, after downloading the folder locally it works.

Now if only there is way to download the folder locally every time wuala is running & to be deleted afterwards...

Could the problem be that Wuala doesn't accept empty folders? This topic seems to suggest non-standard behavior when it comes to empty folders:

https://support.wuala.com/forums/topic/wuala-does-not-accept-an-empty-folder-on-my-lacie-2big-as-sync-partner/

I came across this issue today and I don't think its related to the file system being virtual or not. The answer is really simple and weird.

I followed these steps to reproduce the issue:

  1. Open a Terminal and cd to a directory (let's say /home/user/dir)
  2. Delete the directory from your file manager (nautilus in my case)
  3. The console still shows :

user@user-PC:~/dir$

although the directory doesn't exist.

  1. Run a node command. I ran sudo npm update -g cordova

You get the above error. So, the solution is as simple as being in a directory which exists and then executing the node command.