Angular-cli not generating dist directory with ng build
Here is what I have installed: #angular/cli: 1.0.0-rc.1 node: 7.4.0 os: linux x64 #angular/common: 2.4.9 #angular/compiler: 2.4.9 #angular/core: 2.4.9 #angular/forms: 2.4.9 #angular/http: 2.4.9 #angular/platform-browser: 2.4.9 #angular/platform-browser-dynamic: 2.4.9 #angular/router: 3.4.9 #angular/cli: 1.0.0-rc.1 I have looked at this post Not generating dist folders , but I just want a dist directory generated so that I can link it with Express. The command I am using is ng build --base-href /apply/ I understand with ng serve the files are created in memory. However I am not using ng serve. I have a Express static path app.use('/', express.static(path.resolve('../../dist'))); Since the build command does not create the dist directory I cannot serve the angular application. The answer in the link (above) says to use the --watch argument. Why do I have to do that? Shouldn't ng build create the dist directory? Am I missing something obvious. Any help is appreciated.
Here is what I have learned. The reason there was no dist directory being created was due to the fact that there was a compiling error (in older cli version this was not the case). The error was ERROR in Error encountered resolving symbol values statically. Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler (position 79:22 in the original .ts file), resolving symbol AUTH_PROVIDERS in ... I removed the dependency of AUTH_PROVIDERS from app_module.ts. Once this was done the project compiled ok.
Angular Cli - How do I rebuild my project
How to change angular 2 port from 4200 to any other
Is autoprefixer active in angular-cli beta 19
How to use nconf with Angular CLI?
angular-cli how to split output js files to vendor and script js file
Errors when installing angular-cli
Using Angular-CLI build to copy a file / directory
angular-cli 'ng' commands sluggish
I keep getting errors when usng angualr-cli - Cannot find Set, Promise, Map
Angular CLI installation failure
Angular CLI modify component generation
Error: Cannot find module '#angular/core'
How to build multiple applications with angular-cli?
Angular 2 Final port :4200 not working with ip (192.168.0.xxx:4200) only localhost:4200
Angular-cli + primeng require is not defined
angular-cli install error “Native code compile failed”