Angular CLI: 6.0.0-rc.4
Node: 9.9.0
OS: darwin x64
Angular: 6.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.5.6
@angular-devkit/build-angular 0.5.6
@angular-devkit/build-optimizer 0.5.6
@angular-devkit/core 0.5.6
@angular-devkit/schematics 0.5.6
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.0-rc.4
@schematics/angular 0.5.6
@schematics/update 0.5.6
rxjs 5.6.0-forward-compat.3
typescript 2.7.2
webpack 4.5.0
yarn link "@cleverdata/dmpkit"ng serveERROR in ../cleverdata-dmpkit-common-ui/src/http/index.ts
Module build failed: Error: /Users/akrasman/work/dmpkit/cleverdata-dmpkit-common-ui/src/http/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
at AngularCompilerPlugin.getCompiledFile (/Users/akrasman/work/dmpkit/cleverdata-dmpkit-filemanager-ui/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:707:23)
at plugin.done.then (/Users/akrasman/work/dmpkit/cleverdata-dmpkit-filemanager-ui/node_modules/@ngtools/webpack/src/loader.js:41:31)
at <anonymous>
Linked folders inside node_modules shouldn't crash build process like in [email protected] with option --preserve-symlinks
I'm not sure how this is different from https://github.com/angular/angular-cli/issues/8284. It looks like you're trying to use some TS files inside your node_modules.
If you want the app to compile TS files you need to add them to the files or include property as the message says.
There is more information in https://github.com/angular/angular-cli/issues/8284#issuecomment-341417325.
If you think that's not the case, can you provide a simple reproduction please?
Marking this as nice to have until we have repro steps and can assess if this is required.
I'm not sure how this is different from #8284. It looks like you're trying to use some TS files inside your node_modules.
Seems like it's the same issue but the thing is that linked packages with TS files worked in CLI 1.7 and I didn't have to add node_modules/@cleverdata/dmpkit to include in tsconfig, I just used --preserve-symlinks flag.
Will it be useful if I make a repo with 2 branches (CLI 1.7 and CLI 6.0.0-rc.4) for reproducing both cases?
@filipesilva, I've created a demo with repro steps.
As I told before, this case worked well in CLI 1.7.3 with --preserve-symlinks flag which disappeared in 6.0.0 for some reason.
It's a very important case for development and supporting packages that you use in other angular application.
Well, I found out that --preserve-symlinks flag is still available for ng build command, what is more, my demo builds correctly when I use ng build --preserve-symlinks. Therefore, if we could return --preserve-symlinks for ng serve command it would resolve a problem.
@Iverson if your app needs --preserve-symlinks to build properly, then you should set it in your angular.json for it to always be used.
You can set it in this section:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"preserveSymlinks": true
This way it will always be used, without needing to use the flag every time.
@filipesilva, thank you! It works.
@filipesilva this option doesn't seem to be available anymore in 6.0.0 with ng serve, although it still works when configured in angular.json. Any chance of bringing back the option in the cli?
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@Iverson if your app needs
--preserve-symlinksto build properly, then you should set it in yourangular.jsonfor it to always be used.You can set it in this section:
This way it will always be used, without needing to use the flag every time.