Base solution for your next web application

Activities of "ardrian"

Question

Hi,

I've successfully created an ASP.NET Core + Angular 2 project from the template builder at <a class="postlink" href="https://aspnetboilerplate.com/">https://aspnetboilerplate.com/</a>. I've successfully built a full project which runs fine on local host (both the Web API and the Angular front end). However I have come across deployment issues. So I've simplified my test here.

I've created a fresh project from the template generator at <a class="postlink" href="https://aspnetboilerplate.com/">https://aspnetboilerplate.com/</a>

If I unzip the given zip file, and then run the following commands in the angular directory:

npm install 
npm start

The server starts fine, and I can connect to <a class="postlink" href="http://localhost:4200">http://localhost:4200</a>

I then try a build, and it does not work

ng build

produces a valid output in the 'dist' directory however if I run

ng build --prod

. I receive the following error:

C:\dev\fac\Test2\angular>ng build --prod
Your global Angular CLI version (1.0.0) is greater than your local
version (1.0.0-rc.2). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Hash: c84a5b8860d56f737e36
Time: 32247ms
chunk    {0} polyfills.0c7d2796d4a8fb89f144.bundle.js (polyfills) 157 kB {5} [initial] [rendered]
chunk    {1} scripts.a3a06162c794ae0baa0f.bundle.js (scripts) 678 kB {5} [initial] [rendered]
chunk    {2} styles.35fa8543aa31714441cb.bundle.css (styles) 440 bytes {5} [initial] [rendered]
chunk    {3} main.8bff35e768e0f94109c3.bundle.js (main) 4.68 kB {4} [initial] [rendered]
chunk    {4} vendor.736f99abce120fcce6fd.bundle.js (vendor) 1.64 MB [initial] [rendered]
chunk    {5} inline.ca4ef5f69789d84aed0a.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in Error encountered resolving symbol values statically. Reference to a non-exported function (position 21:10 in the original .ts file), resolving symbol accountModuleAnimation in C:/dev/fac/Test2/angular/src/shared/animations/routerTransition.ts, resolving symbol LoginComponent in C:/dev/fac/Test2/angular/src/account/login/login.component.ts, resolving symbol LoginComponent in C:/dev/fac/Test2/angular/src/account/login/login.component.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/root.module.ngfactory' in 'C:\dev\fac\Test2\angular\src'
 @ ./src/main.ts 7:0-72
 @ multi ./src/main.ts

C:\dev\fac\Test2\angular>

It seems that the angular-cli build compiler isn't happy with the way the functions are exported in the src/shared/animations/routerTransition.ts file. I've tried various ways to change the function export, however with no luck so far.

I've been stuck on this problem for a while now, so any help would be really appreciated.

Hi,

What is the best way to upgrade a project using ASP.NET Zero, when a new version is out.

I understand that it is impossible to provide a solution which supports auto-updating, as there may be breaking changes in new editions. But what would the best practice be.

For example right now I have a project using ASP.NET Zero 1.1.0, and 1.2.2 is out. What would a decent approach be?

Thanks

Showing 1 to 2 of 2 entries