Skip to content

Symlinks on Windows

Ruslan Konviser edited this page Dec 13, 2019 · 2 revisions

Clone with Symlinks support

Version 0.3 (current) of Ever Platform is using symlinks.
Because of that, it's important to clone the repo with symlinks enabled, like:

git clone -c core.symlinks=true --recursive https://github.com/ever-co/ever.git

IMPORTANT: on Windows, you may need to clone from an elevated command prompt ("Run as Administrator")

Recreate symlinks (if the clone does not work well for you)

In some cases cloning the repo with symlinks cause issues on Windows PCs (we were unable identity why exactly that happens).

So, this is a full list of commands useful to "recreate" symlinks (run from Console running as Administrator on Windows from root of the mono-repo):

cmd /c rmdir .\admin\website-angular\src\modules\server.common
cmd /c rmdir .\admin\website-angular\src\modules\client.common.angular2
cmd /c rmdir .\backend\api\src\modules\server.common
cmd /c rmdir .\carrier\mobile-ionic\src\modules\server.common
cmd /c rmdir .\carrier\mobile-ionic\src\modules\client.common.angular2
cmd /c rmdir .\merchant\tablet-ionic\src\modules\server.common
cmd /c rmdir .\merchant\tablet-ionic\src\modules\client.common.angular2
cmd /c rmdir .\shop\mobile-ionic\src\modules\server.common
cmd /c rmdir .\shop\mobile-ionic\src\modules\client.common.angular2
cmd /c rmdir .\shop\website-angular\src\modules\server.common
cmd /c rmdir .\shop\website-angular\src\modules\client.common.angular2
mklink /D admin\website-angular\src\modules\server.common shared\core
mklink /D admin\website-angular\src\modules\client.common.angular2 shared\core-angular
mklink /D backend\api\src\modules\server.common shared\core
mklink /D carrier\mobile-ionic\src\modules\server.common shared\core
mklink /D carrier\mobile-ionic\src\modules\client.common.angular2 shared\core-angular
mklink /D merchant\tablet-ionic\src\modules\server.common shared\core
mklink /D merchant\tablet-ionic\src\modules\client.common.angular2 shared\core-angular
mklink /D shop\mobile-ionic\src\modules\server.common shared\core
mklink /D shop\mobile-ionic\src\modules\client.common.angular2 shared\core-angular
mklink /D shop\website-angular\src\modules\server.common shared\core
mklink /D shop\website-angular\src\modules\client.common.angular2 shared\core-angular

However, in all PATHs above used in mklink, it looks like full PATH is required, e.g. like mklink /D C:\Coding\Ever\ever\backend\api\src\modules\server.common C:\Coding\Ever\ever\shared\core, otherwise symlinks created the wrong way and did not work...

Note: see the relevant issue for more details.