compiler fails on simplest of generated apps (with windows 10 junctions)
See original GitHub issueVersions
Angular CLI: 1.5.3
Node: 6.11.3
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.3
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.3
@schematics/angular: 0.1.5
typescript: 2.6.1
webpack: 3.8.1
Repro steps
using the most basic ng cli, using a “local dir” for "common files"works perfectly, however if I switch to a windows junction (with the same name and exactly the same files) compilation fails with:
Observed behavior
D:\web\angular4\teststuff\test-cli>ng build
Date: 2017-11-22T19:06:43.880Z
Hash: 68750acea9ebd39ab42b
Time: 4174ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 8.51 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 200 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 11.3 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.92 MB [initial] [rendered]
ERROR in D:/web/tslibs5/tlibs.module.ts
Module build failed: Error: D:\web\tslibs5\tlibs.module.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
at AngularCompilerPlugin.getCompiledFile (D:\web\angular4\teststuff\test-cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:619:23)
at plugin.done.then (D:\web\angular4\teststuff\test-cli\node_modules\@ngtools\webpack\src\loader.js:467:39)
@ ./src/app/app.module.ts 10:0-50
@ ./src/main.ts
@ multi ./src/main.ts
Desired behavior
What did you expect to see?
compiler to finish compilation…
Always happy to provide as much information as required…
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
ng build --prod unable to process symbolic links #5098 - GitHub
As they share many components, services etc, I created a folder ... compiler fails on simplest of generated apps (with windows 10 junctions) ......
Read more >Using NTFS Junctions to Fix Application Compatibility Issues ...
This paper describes a simple way to mitigate some types of application compatibility problems with legacy applications installed on 64-bit ...
Read more >Cannot delete junction that points to directory that is a known ...
From a command window (running as Administrator), I tried: C:\Users\uname> rmdir Documents. and got the error "Access is Denied".
Read more >Junction Links, Windows 10 - Microsoft Community
I have read some on the internet and stumbeled across something called Junction Links. A hard link between local directories. An example: I...
Read more >Move a installed Application to a different Drive letter via ...
This created junction points for each directory on the C drive that Office installs to, and point them to the O drive.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve found this thread, they show how to use the --preserve-symlinks parameter, it worked for me, for example: ng serve --host 0.0.0.0 --disable-host-check --preserve-symlinks --base-href /
however, it would be better to have this parameter in angular-cli.json, it’s there for ng build, but not for serve or test.
glad I’ve found this thread, I have the same error message and I would never thought it’s the windows junction issue. for me as well - if I copy the junction folder to a local folder and work with it then the above error is gone. I’m on windows 7.
On previous projects that I worked with junction folders this problem didn’t happen. I used to work with angular 4 without angular cli. I now started a new angular 5 project with angular cli by issuing ‘new new …’ and added the source files from the angular 4 project just to end up with this error message. so I’m not sure which fault it is, angular 5 or angular cli.
It still looks strange that the windows junction is causing this kind of a problem, as far as I understand the os handles it and this junction folder should be seen as a local folder to the referring code.
I’m waiting for a solution on this one, the junction folder has a major importance since the code within it is shared among several projects, and now that it is not synced with the other code can lead to consistency bugs. please let us know once you can find something on this one. thanks.