Running ng commands when project is stored on shared/symlinked network drive
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [x] build
- [x] serve
- [x] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [x] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
node -v
v8.11.3
npm --version
6.3.0
ng --version
Angular CLI: 6.1.3
Node: 8.11.3
OS: win32 x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.7.3
@angular/cli 6.1.3
@ngtools/webpack 6.0.8
@schematics/angular 0.7.3
@schematics/update 0.7.3
rxjs 5.5.11
typescript 2.5.3
webpack 4.8.3
Repro steps
Have a directory mapped to network drive. When ng command is run the directory path is resolved with ip of network drive so instead
C:\Projects\AITeF\AITeF
it is resolved to :
C:\192.168.*.*\Projects_D2\AITeF\AITeF
The log given by the failure
Desired functionality
Mention any other details that might be useful
I moved my project to remote desktop on Windows 10. The local drive that project is on is symlinked to a network drive so all computers in my company have access to it. Unfortunately, when things are configured this way, I cannot run any ng command. They always give an error like this.
It’s because it tries to acces the project via 'C:\192.168..\Projects_D2\AITeF\AITeF while the path should look like this C:\Projects\AITeF\AITeF.
I tried adding “preserveSymlinks”: true in my angular.json file but this doesn’t work.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5
I have a similar issue,
All symlinks on windows are being “resolved” instead of being interpreted. This is not an issue on the local machine symlinks. Like
symlink C:\Foo -> real folder D:\Boo
is always presented in logs asD:\Boo
. This is not perfect but it works. but the problem starts with remote locations.The drive letter is not removed from remote location path thus
symlink target \\192.168.*.*\Foo symlink location C:/Foo -> real folder on remote machine D:/Boo
is always presented in logs asC:\192.168.*.*\Boo
which is not existing location as you might have noticed.The desired result would be
\\192.168.*.*\Foo
if ng is supporting networking location or the most perfect would be not resolved at allC:\Foo
.This is huge issue for us, please advice.
Hi, I’m having a similar problem when trying to build an angular project that lives in a VirtualBox shared folder. From what I can see, the problem is that find-up is not finding the angular.json file due to the following while clause:
while (currentDir && currentDir !== root)
In my case, my angular project lives in my V: drive. That means that currentDir and root are exactly the same, and that’s why never gets into the while clause. I’m pretty new to angular and it’s unclear to me whether this is a wrong approach, but from what I can tell, I follow the same approach in many projects using different technologies, specially when you use vagrant boxes to work on different projects that require different set-ups/environments.
As a workaround, I updated my provisioning script to copy our angular project into a different folder (not a shared one) and build from there, but still, it’s a bit annoying. Is there any possibility to get this fixed? Let me know if you want me to provide more information that could help to get this fixed.