1

I was trying to create a node.js (express.js) app on a shared folder in VirtualBox (guest Ubuntu, host Win7). During this try I got an error saying symlinks are not supported by my drive. This is a minor issue, but...

If symlinks are so important to node projects how it's possible to store the project on SVN service (which ignores symlinks). Or what happens if I ZIP the directory with the project and send it to someone. Will it still work?

It seems like a silly question, but I just got an error on creating an express.js project caused by symlinks-not-supported message.

andrew.fox
  • 7,435
  • 5
  • 52
  • 75
  • Just in case someone missed this: http://subversion.apache.org/faq.html#symlinks – bahrep Oct 03 '12 at 20:19
  • 1
    Yeah, but really what I want to achieve is to develop on windows (netbeans) and run on linux ^^ So I need to know whether those symlinks are essential or just used during the installation process. – andrew.fox Oct 03 '12 at 20:45

2 Answers2

1

I don't know how exactly you were creating your express project nor how you came by the error, but I can tell you from experience that symlinks are not essential for node projects.

My usual development environment is Windows 7 and deploying to linux is just a simple matter of moving the files into the other environment either by packing them, using git or creating a nvm package or any other way.

DeadAlready
  • 2,988
  • 19
  • 18
  • As I said, I created the project on linux guest on shared directory (with windows). Do you have any problems with node on windows? I'd rather develop on Windows but I heard that there are some weird problems connected with it. – andrew.fox Oct 04 '12 at 17:54
  • Haven't had any problems besides some modules not working due to compilation failures – DeadAlready Oct 04 '12 at 18:31
  • I mark this response as an answer because it ensured me that my way is OK. Id est, I still work on shared directory in Ubuntu while files are on host Windows 7, but when I encounter any "symlinks" errors during module installation do I perform actions: (1) copy files to linux partition, (2) perform module installation, (3) copy files back to shared folder. Lucky modules ain't installed every day :) – andrew.fox Oct 05 '12 at 18:55
1

If you would like to enable the creation of symlinks in VirtualBox use the following:

VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1

Note that the SHARE_NAME should not include the sf_ part - just the name visible when you view it in the Shared Folders screen in the VirtualBox interface.

This will enable symlink creation from a guest. However, it could open up a security issue. You can read more about the problem on the VirtualBox site here and decide if it is the correct choice for your requirements. Another discussion of this solution for Windows users is here.

SnapShot
  • 5,464
  • 5
  • 42
  • 40