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

Generating a barrel when calling ng g component <myName>
Setting up tether-drop to work with angular-cli#1.0.0-beta.24
Angular CLI (AOT) gives error: ERROR in Cannot determine the module for class
Angular CLI - ng serve won't run unless I specify port
ERROR in Multistyles…Module not Found (Angular-cli.json)
Angular Cli support for inline templates and css
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

Categories

HOME
sidekiq
batch-processing
semantic-ui
filterrific
amazon-swf
paramiko
angular2-routing
computer-vision
matplotlib
phpstorm
codeeffects
is-empty
urlencode
proguard
diagram
hosts
game-maker-studio-1.4
viber
rebol2
riak
reduction
apache-karaf
arraylist
primes
boolean-expression
pycrypto
autolayout
apply
source-maps
shopping-cart
compare-and-swap
pentaho-report-designer
mayavi
websauna
von-neumann
nunit-3.0
broadleaf-commerce
meta-raspberrypi
tic-tac-toe
twiki
lexical-analysis
control-flow-graph
distributed-transactions
spring-bean
rkt
cppunit
prototypejs
context-free-language
dojox.grid.datagrid
aqgridview
range-v3
chunked-encoding
applepayjs
persistent
dwarf
chrome-remote-desktop
text-classification
gmt
lotus
autoresize
typhoon
fps
mpeg-4
supportmapfragment
proxygen
twgl.js
eml
multinomial
acm
file-diffs
matcaffe
kendo-menu
anti-patterns
built-in
vine
pyopengl
divide-by-zero
digits
robocode
multipleselection
ctrlp
and-operator
cg
node-inspector
boost-test
pic24
voldemort
map-force
flash-cc
multiple-conditions
client-side-scripting
shiva3d
digital-design
zend-lucene
appfog
reporting-tools
blockingqueue
macruby
legacy-code
rose-db-object
die
jpf
visual-web-gui
fileutils
dcpu-16
carbide
idictionary
openwysiwyg
act
lazy-c++

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