angular-cli


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.

Related Links

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”

Categories

HOME
sql-server-2008
websphere
filterrific
boost-thread
backup
zend-framework2
apollo
is-empty
rocketmq
phonegap-cli
ios10
phaser-framework
quill
tizen-wearable-sdk
tumblr
ng-admin
gimp
goutte
deeplearning4j
rfid
public-key-encryption
maxima
pyyaml
grub2
sensu
hhvm
binutils
k2
qsub
bootstrap-typeahead
searchbar
pipelinedb
osmdroid
dss
lmdb
twitter-bootstrap-2
read-write
ipfw
freebase
web-audio-api
jquery-cycle2
shibboleth
magiczoomplus
installshield-2012
parent
alchemy.js
google-account
filepath
applepayjs
maintenance
chrome-remote-desktop
static-code-analysis
search-box
mercury
addin-express
pdflib
try-finally
zurb-foundation-apps
mongoskin
kendo-combobox
insertion-sort
file-diffs
geodjango
intellitest
graphical-logo
cpu-cores
mdm-zinc
pl-i
kendo-mvvm
and-operator
scala-2.11
mov
dache
jstack
visual-studio-addins
sanitization
osx-snow-leopard
sslexception
leptonica
stagefright
ftp4j
nuspec
iconv
client-library
abnf
cgpath
attachevent
blockingqueue
radchart
caliper
expression-evaluation
parameterization
applicationcontext
file-exists
visual-web-gui
selectmanycheckbox
server-error
pureftpd
mvccontrib-grid
jquery-ui-button
iphone-sdk-3.2
winsnmp
odbc-sql-server-driver
data-execution-prevention

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App