Problems on symlinking from a synced folder

2,418 views
Skip to first unread message

Dirk Moll

unread,
Feb 22, 2016, 4:36:29 AM2/22/16
to Vagrant
Hi, 

have a php/java script project which has syncs the html folder between my windows host and the vagrant guest. 
config.vm.synced_folder "source/", "/var/www/html", create: true, owner: "www-data", group: "www-data"

If i start the machine, move with cd /var/www/html/project into it and start a build process I got this error
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsev...@1.0.7
npm WARN transpa...@0.1.0 No repository field.
npm WARN transpa...@0.1.0 No license field.
npm ERR! Linux 3.13.0-77-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.3.1
npm ERR! npm  v3.7.3
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/var/www/html/project/node_modules/.bin/acorn'
npm ERR!
npm ERR! If you need help, you may report this error at:

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/frontend/npm-debug.log
vagrant@vagrant-ubuntu-trusty-64:/var/www/html/project$

The build.sh file which starts the build process is starting external libraries which create symlinks from the folder... 
This is failing. How to solve this? Any hints?

regards
Dirk 

Alvaro Miranda Aguilera

unread,
Feb 22, 2016, 10:02:14 AM2/22/16
to vagra...@googlegroups.com
Hello,

Seems you can enable symlinks on VirtualBox.

I personally I haven't tested this, but worth to check:


Thanks
Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/7cbec07e-ad36-4758-8136-786de481c361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dirk Moll

unread,
Feb 23, 2016, 5:03:56 AM2/23/16
to vagra...@googlegroups.com
I tested the link... and as many links i have seen and tested before, it was not working. 

Cannot create a symlink from the synced folder....

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsev...@1.0.7
npm WARN proje...@0.1.0 No repository field.
npm WARN proje...@0.1.0 No license field.
npm ERR! Linux 3.13.0-77-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.3.1
npm ERR! npm  v3.7.3
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/var/www/html/project/node_modules/.bin/acorn'
npm ERR!
npm ERR! If you need help, you may report this error at:

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/project/npm-debug.log
vagrant@vagrant-ubuntu-trusty-64:/var/www/html/project$

Anyone else with a hint for me?



      Dirk Moll                           
      Fachinformatiker               Anwendungs - Entwicklung
      Römerstrasse 189            50321 Brühl     Deutschland
      02232-1506087 0176-70554853  po...@dirk-moll.de


You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/1uTc02TfV34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ew%3DjUUB4G8JZMDA3q5VGoZYBZCpLo3PZNuDUmq0Rxae9w%40mail.gmail.com.

Dirk Moll

unread,
Feb 23, 2016, 5:05:13 AM2/23/16
to Vagrant

Joaquin Menchaca

unread,
Mar 18, 2016, 2:42:59 PM3/18/16
to Vagrant
Symlinks do not work well on Windows.  I would recommend using rsync on Windows, and then rsync them to some place, then do your npm install.  The mounted drive through Virtualbox's driver on Windows doesn't work very well.  You can also get a lot of weird file permission errors as well.

For rsync on Windows, the easiest path of least resistance in my experience is to download and install use msys2, then use their package management utility, pacman, to install git, rsync and whatever other tools you need.  Then within the msys2 console, launch vagrant, rsync your code files, then do an npm install.


Dirk Moll

unread,
Mar 21, 2016, 2:15:30 AM3/21/16
to vagra...@googlegroups.com
Hi, 

thanx for reply but 

how does it work with rsync through a virtual box running in vagrant?
I got a source folder where I work from my windows IDE to write PHP and JS.
To install the nodeJS stuff, nodeJS is doing the symlinks. 

regards 
Dirk 


      Dirk Moll                           
      Fachinformatiker               Anwendungs - Entwicklung
      Römerstrasse 189            50321 Brühl     Deutschland
      02232-1506087 0176-70554853  po...@dirk-moll.de


2016-03-18 19:42 GMT+01:00 Joaquin Menchaca <joaqu...@gmail.com>:
Symlinks do not work well on Windows.  I would recommend using rsync on Windows, and then rsync them to some place, then do your npm install.  The mounted drive through Virtualbox's driver on Windows doesn't work very well.  You can also get a lot of weird file permission errors as well.

For rsync on Windows, the easiest path of least resistance in my experience is to download and install use msys2, then use their package management utility, pacman, to install git, rsync and whatever other tools you need.  Then within the msys2 console, launch vagrant, rsync your code files, then do an npm install.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/1uTc02TfV34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages