Base solution for your next web application

Activities of "TimMackey"

Answer

The error has vanished as quickly as it appeared. For no appearant reason. I would like to keep this ticket open for a while with the expectation that thet error could re-appear. For no appearant reason.

Answer
C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular>npm run create-dynamic-bundles

> [email protected] create-dynamic-bundles
> gulp buildDev

[17:17:55] Using gulpfile ~\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js
[17:17:55] Starting 'buildDev'...
[17:17:55] 'buildDev' errored after 85 ms
[17:17:55] Error: Invalid glob argument:
    at Gulp.src (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\vinyl-fs\lib\src\index.js:20:11)
    at createStyleBundle (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:96:23)
    at createStyleBundles (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:84:13)
    at buildDev (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:129:22)
    at taskWrapper (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (node:domain:421:15)
    at runBound (node:domain:432:12)
    at asyncRunner (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\async-done\index.js:55:18)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular>
Question

ANZ ver 8.5.0 (upgrading from 8.4.0) angular/.net Core

When building from the released 8.5.0 gulp behaves normally.

C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular>npm start

> [email protected] start
> gulp buildDev && ng serve --host 0.0.0.0 --port 4200

[23:38:28] Using gulpfile ~\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js
[23:38:28] Starting 'buildDev'...
Dynamic bundles are being created.
[23:39:29] Finished 'buildDev' after 1 min
WARNING: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.

After migrating most files from 8.4.0 to 8.5.0 there comes a time when the weirdness begins. This error appears:

C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular>npm start

> [email protected] start
> gulp buildDev && ng serve --host 0.0.0.0 --port 4200

[23:07:42] Using gulpfile ~\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js
[23:07:42] Starting 'buildDev'...
[23:07:42] 'buildDev' errored after 62 ms
[23:07:42] Error: Invalid glob argument:
    at Gulp.src (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\vinyl-fs\lib\src\index.js:20:11)
    at createStyleBundle (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:96:23)
    at createStyleBundles (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:84:13)
    at buildDev (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\gulpfile.js:129:22)
    at taskWrapper (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (node:domain:421:15)
    at runBound (node:domain:432:12)
    at asyncRunner (C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular\node_modules\async-done\index.js:55:18)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

C:\Users\Tim\Documents\__ngTTMv850\ngTTM\angular>

I backed out the most recent change and the error still appears. I have reverted all the .json files and relevant *.module.ts filess to the original 8.5.0 release, and the error persists. In the past week I have started from scratch 3 times now in an attempt to identify the cause, all without success.

I reviewed issues #7423, #8592, and #8657. They did not contain a solution that worked for me.

Can you suggest what I might look for to be possible causes of this error? And how to recover, short of starting over?

ANZ version 8.5.0 angular/.net core

The above solution has appeared to work for a long time, Now I'm migrating from 8.4.0 to 8.5.0 'npm start' for ver 8.4.0 is a clean build with no conflict warnings or "Compiling" messages.

For ver 8.5.0, when the "glob": ... etc. is included in angular.json I'm getting warnings for 'npm start', as follows:

WARNING in Conflict: Multiple assets emit different content to the same filename fa-brands-400.eot
WARNING in Conflict: Multiple assets emit different content to the same filename fa-regular-400.eot
WARNING in Conflict: Multiple assets emit different content to the same filename fa-solid-900.eot
WARNING in Conflict: Multiple assets emit different content to the same filename fa-brands-400.woff2
WARNING in Conflict: Multiple assets emit different content to the same filename fa-regular-400.woff2
WARNING in Conflict: Multiple assets emit different content to the same filename fa-solid-900.woff2
WARNING in Conflict: Multiple assets emit different content to the same filename fa-brands-400.woff
WARNING in Conflict: Multiple assets emit different content to the same filename fa-regular-400.woff
WARNING in Conflict: Multiple assets emit different content to the same filename fa-solid-900.woff
WARNING in Conflict: Multiple assets emit different content to the same filename fa-brands-400.ttf
WARNING in Conflict: Multiple assets emit different content to the same filename fa-regular-400.ttf
WARNING in Conflict: Multiple assets emit different content to the same filename fa-solid-900.ttf
WARNING in Conflict: Multiple assets emit different content to the same filename fa-brands-400.svg
WARNING in Conflict: Multiple assets emit different content to the same filename fa-regular-400.svg
WARNING in Conflict: Multiple assets emit different content to the same filename fa-solid-900.svg

If I DO NOT include the "glob" solution, the WARNINGs do not appear, however the following messages appear:

Compiling primeng/dom : module as esm5
Compiling @angular/cdk/keycodes : module as esm5
Compiling @angular/animations : module as esm5
Compiling ngx-bootstrap/chronos : module as esm5
Compiling @angular/compiler/testing : module as esm5
Compiling ngx-bootstrap/mini-ngrx : module as esm5
Compiling @angular/core : module as esm5
Compiling ngx-bootstrap/locale : module as esm5
Compiling @angular/common : module as esm5
Compiling @angular/cdk/collections : module as esm5
Compiling @angular/animations/browser : module as esm5
Compiling ngx-bootstrap/collapse : module as esm5
Compiling ngx-bootstrap/utils : module as esm5
Compiling @angular/cdk/observers : module as esm5
Compiling @angular/core/testing : module as esm5
Compiling @angular/cdk/accordion : module as esm5
Compiling @angular/cdk/platform : module as esm5
Compiling @angular/router : module as esm5
Compiling @angular/cdk/bidi : module as esm5
Compiling primeng/button : module as esm5
Compiling @angular/platform-browser : module as esm5
Compiling @angular/forms : module as esm5
Compiling ngx-bootstrap/positioning : module as esm5
Compiling primeng/api : module as esm5
Compiling @angular/common/http : module as esm5
Compiling primeng/tooltip : module as esm5
Compiling @angular/cdk/scrolling : module as esm5
Compiling primeng/inputtext : module as esm5
Compiling @angular/platform-browser-dynamic : module as esm5
Compiling primeng/utils : module as esm5
Compiling ngx-bootstrap/component-loader : module as esm5
Compiling @angular/cdk/portal : module as esm5
Compiling @angular/platform-browser/testing : module as esm5
Compiling @angular/cdk/a11y : module as esm5
Compiling @angular/platform-browser/animations : module as esm5
Compiling primeng/focustrap : module as esm5
Compiling primeng/messages : module as esm5
Compiling primeng/progressbar : module as esm5
Compiling primeng/dropdown : module as esm5
Compiling @angular/http : module as esm5
Compiling @angular/common/testing : module as esm5
Compiling ngx-bootstrap/accordion : module as esm5
Compiling @angular/platform-browser-dynamic/testing : module as esm5
Compiling ngx-bootstrap/alert : module as esm5
Compiling primeng/paginator : module as esm5
Compiling @angular/platform-server : module as esm5
Compiling ngx-bootstrap/buttons : module as esm5
Compiling ngx-bootstrap/carousel : module as esm5
Compiling ngx-bootstrap/modal : module as esm5
Compiling ngx-bootstrap/dropdown : module as esm5
Compiling ngx-bootstrap/pagination : module as esm5
Compiling ngx-bootstrap/datepicker : module as esm5
Compiling ngx-bootstrap/rating : module as esm5
Compiling ngx-bootstrap/progressbar : module as esm5
Compiling ngx-bootstrap/sortable : module as esm5
Compiling ngx-bootstrap/tabs : module as esm5
Compiling ngx-bootstrap/timepicker : module as esm5
Compiling ngx-bootstrap/tooltip : module as esm5
Compiling ngx-bootstrap/popover : module as esm5
Compiling primeng/accordion : module as esm5
Compiling ngx-bootstrap/typeahead : module as esm5
Compiling primeng/blockui : module as esm5
Compiling primeng/autocomplete : module as esm5
Compiling primeng/breadcrumb : module as esm5
Compiling primeng/calendar : module as esm5
Compiling primeng/captcha : module as esm5
Compiling primeng/card : module as esm5
Compiling primeng/carousel : module as esm5
Compiling primeng/checkbox : module as esm5
Compiling primeng/chart : module as esm5
Compiling primeng/codehighlighter : module as esm5
Compiling primeng/colorpicker : module as esm5
Compiling primeng/chips : module as esm5
Compiling primeng/confirmdialog : module as esm5
Compiling primeng/contextmenu : module as esm5
Compiling primeng/dataview : module as esm5
Compiling primeng/defer : module as esm5
Compiling primeng/dialog : module as esm5
Compiling primeng/dragdrop : module as esm5
Compiling primeng/dynamicdialog : module as esm5
Compiling primeng/fieldset : module as esm5
Compiling primeng/editor : module as esm5
Compiling primeng/fileupload : module as esm5
Compiling primeng/fullcalendar : module as esm5
Compiling primeng/gmap : module as esm5
Compiling primeng/galleria : module as esm5
Compiling primeng/inplace : module as esm5
Compiling primeng/inputmask : module as esm5
Compiling primeng/inputswitch : module as esm5
Compiling primeng/lightbox : module as esm5
Compiling primeng/keyfilter : module as esm5
Compiling primeng/inputtextarea : module as esm5
Compiling primeng/megamenu : module as esm5
Compiling primeng/listbox : module as esm5
Compiling primeng/message : module as esm5
Compiling primeng/menu : module as esm5
Compiling primeng/menubar : module as esm5
Compiling primeng/orderlist : module as esm5
Compiling primeng/organizationchart : module as esm5
Compiling primeng/overlaypanel : module as esm5
Compiling primeng/multiselect : module as esm5
Compiling primeng/panel : module as esm5
Compiling primeng/panelmenu : module as esm5
Compiling primeng/progressspinner : module as esm5
Compiling primeng/password : module as esm5
Compiling primeng/picklist : module as esm5
Compiling primeng/rating : module as esm5
Compiling primeng/radiobutton : module as esm5
Compiling primeng/scrollpanel : module as esm5
Compiling primeng/sidebar : module as esm5
Compiling primeng/selectbutton : module as esm5
Compiling primeng/slidemenu : module as esm5
Compiling primeng/slider : module as esm5
Compiling primeng/splitbutton : module as esm5
Compiling primeng/spinner : module as esm5
Compiling primeng/steps : module as esm5
Compiling primeng/tabmenu : module as esm5
Compiling primeng/terminal : module as esm5
Compiling primeng/tabview : module as esm5
Compiling primeng/table : module as esm5
Compiling primeng/tieredmenu : module as esm5
Compiling primeng/toast : module as esm5
Compiling primeng/togglebutton : module as esm5
Compiling primeng/toolbar : module as esm5
Compiling primeng/tree : module as esm5
Compiling primeng/treetable : module as esm5
Compiling @angular/animations/browser/testing : module as esm5
Compiling primeng/tristatecheckbox : module as esm5
Compiling @angular/cdk/clipboard : module as esm5
Compiling primeng/virtualscroller : module as esm5
Compiling @angular/cdk/drag-drop : module as esm5
Compiling @angular/cdk/layout : module as esm5
Compiling @angular/cdk/text-field : module as esm5
Compiling @angular/cdk/stepper : module as esm5
Compiling @angular/cdk/table : module as esm5
Compiling @angular/cdk/tree : module as esm5
Compiling @angular/cdk/overlay : module as esm5
Compiling @angular/common/http/testing : module as esm5
Compiling @angular/http/testing : module as esm5
Compiling @angular/platform-server/testing : module as esm5
Compiling @angular/router/testing : module as esm5
Compiling angular-gridster2 : module as esm5
Compiling abp-ng2-module : module as esm5
Compiling angular2-counto : main as commonjs
Compiling angular-oauth2-oidc : module as esm5
Compiling angular2-text-mask : main as commonjs
Compiling ng2-file-upload : module as esm5
Compiling ngx-captcha : module as esm5
Compiling @swimlane/ngx-charts : module as esm5
Compiling ngx-image-cropper : module as esm5
Compiling ngx-perfect-scrollbar : module as esm5
Compiling ngx-bootstrap : module as esm5
Compiling ngx-spinner : module as esm5
Compiling primeng : module as esm5

In both cases the same errors for all 15 .eot assets are displayed on the browser console:

Conflict: Multiple assets emit different content to the same filename fa-brands-400.eot
.
.
.

tsconfig.json had to be changed to accomodate @nth-cloud/ng-toggle.

{
  "targetComment": "es2015 REQUIRED for @nth-cloud/ng-toggle",
    "angularCompilerOptions": {
        "enableIvy": true
      },
    "compilerOptions": {
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [ "es6", "dom" ],
    "mapRoot": "./",
    "module": "esnext",
    "skipLibCheck": true,
    "moduleResolution": "node",
    "outDir": "../dist/out-tsc",
    "sourceMap": true,
    "target": "es2015",
    "typeRoots": [
      "../node_modules/@types"
    ],
    "baseUrl": ".",
    "paths": {
      "@app/*": [ "./app/*" ],
      "@account/*": [ "./account/*" ],
      "@shared/*": [ "./shared/*" ],
      "@node_modules/*": [ "../node_modules/*" ],
      "@angular/*": [ "../node_modules/@angular/*" ],
      "@metronic/*": [ "./assets/metronic/*" ]
    }
  },
  "exclude": [ "node_modules" ]
}

The duplicate files apear in: angular\node_modules@fortawesome\fontawesome-pro\webfonts ...and... angular\src\assets\metronic\vendors\global\fonts@fortawesome

How can the duplication be resolved?

Question

ANZ version 8.4.0 angular/.NET Core

I see import { Table } from 'primeng/components/table/table'; and import { Table } from 'primeng/table'; being used interchangable throughout the code base.

Not just 'table', but all primeng component references use one reference method or the other; '/primeng/components/[comp]/[comp]' or 'primeng/[comp]'

ANZ apps build and execute correctly. Does it matter which form is used?

Thank you.

Question

What is the link to detailed release notes shared on the GitHub repository (only available to the customers)?

I wiped out the slot and database, copied code from older version Production and loaded it into a new Development slot. Then applied updates. The code began working again. I've been applying more changes over the past few days to see if the error would reappear, and fortunately it has not. I suspect there might have been a missing file. However, I have been unable to ascertain a definitive cause of the error.

I have successfully applied the code sample you sent via email. Thank you.

For anyone else who might be experiencing a similar issue, I am posting the solution here.

HomeController.cs

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Abp.Application.Navigation;
using Abp.Configuration;
using Abp.Configuration.Startup;
using Abp.Extensions;
using Abp.Localization;
using Abp.Runtime.Session;
using Microsoft.AspNetCore.Mvc;
using MyCompanyName.AbpZeroTemplate.Configuration;
using MyCompanyName.AbpZeroTemplate.MultiTenancy;
using MyCompanyName.AbpZeroTemplate.Sessions.Dto;
using MyCompanyName.AbpZeroTemplate.Url;
using MyCompanyName.AbpZeroTemplate.Web.Controllers;
using MyCompanyName.AbpZeroTemplate.Web.Public.Startup;
using MyCompanyName.AbpZeroTemplate.Web.Session;

namespace MyCompanyName.AbpZeroTemplate.Web.Public.Controllers
{
    public class HomeController : AbpZeroTemplateControllerBase
    {
        private readonly IUserNavigationManager _userNavigationManager;
        private readonly IMultiTenancyConfig _multiTenancyConfig;
        private readonly IAbpSession _abpSession;
        private readonly ILanguageManager _languageManager;
        private readonly ISettingManager _settingManager;
        private readonly IPerRequestSessionCache _sessionCache;
        private readonly IWebUrlService _webUrlService;
        private readonly TenantManager _tenantManager;

        public HomeController(
            IUserNavigationManager userNavigationManager, 
            IMultiTenancyConfig multiTenancyConfig,
            IAbpSession abpSession,
            ILanguageManager languageManager, 
            ISettingManager settingManager, 
            IPerRequestSessionCache sessionCache,
            IWebUrlService webUrlService, 
            TenantManager tenantManager)
        {
            _userNavigationManager = userNavigationManager;
            _multiTenancyConfig = multiTenancyConfig;
            _abpSession = abpSession;
            _languageManager = languageManager;
            _settingManager = settingManager;
            _sessionCache = sessionCache;
            _webUrlService = webUrlService;
            _tenantManager = tenantManager;
        }
        
        public async Task<ActionResult> Index(string currentPageName = "")
        {
            var tenancyName = "";
            if (_abpSession.TenantId.HasValue)
            {
                var tenant = await _tenantManager.GetByIdAsync(_abpSession.GetTenantId());
                tenancyName = tenant.TenancyName;
            }

            var model = new PublicHomeIndexViewModel
            {
                LoginInformations = await _sessionCache.GetCurrentLoginInformationsAsync(),
                IsInHostView = !_abpSession.TenantId.HasValue,
                Languages = _languageManager.GetActiveLanguages().ToList(),
                CurrentLanguage = _languageManager.CurrentLanguage,
                Menu = await _userNavigationManager.GetMenuAsync(FrontEndNavigationProvider.MenuName, _abpSession.ToUserIdentifier()),
                CurrentPageName = currentPageName,
                IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled,
                TenantRegistrationEnabled = await _settingManager.GetSettingValueAsync<bool>(AppSettings.TenantManagement.AllowSelfRegistration),
                AdminWebSiteRootAddress = _webUrlService.GetServerRootAddress(tenancyName).EnsureEndsWith('/'),
                WebSiteRootAddress = _webUrlService.GetSiteRootAddress(tenancyName).EnsureEndsWith('/')
            };

            
            return View(model);
        }
    }
    
    public class PublicHomeIndexViewModel
    {
        public GetCurrentLoginInformationsOutput LoginInformations { get; set; }

        public IReadOnlyList<LanguageInfo> Languages { get; set; }

        public LanguageInfo CurrentLanguage { get; set; }

        public UserMenu Menu { get; set; }

        public string CurrentPageName { get; set; }

        public bool IsMultiTenancyEnabled { get; set; }

        public bool TenantRegistrationEnabled { get; set; }

        public bool IsInHostView { get; set; }

        public string AdminWebSiteRootAddress { get; set; }

        public string WebSiteRootAddress { get; set; }

        public string GetShownLoginName()
        {
            if (!IsMultiTenancyEnabled)
            {
                return LoginInformations.User.UserName;
            }

            return LoginInformations.Tenant == null
                ? ".\\" + LoginInformations.User.UserName
                : LoginInformations.Tenant.TenancyName + "\\" + LoginInformations.User.UserName;
        }

        public string GetLogoUrl(string appPath)
        {
            if (!IsMultiTenancyEnabled || LoginInformations?.Tenant?.LogoId == null)
            {
                return appPath + "Common/Images/app-logo-on-light.svg";
            }

            return AdminWebSiteRootAddress.EnsureEndsWith('/') + "TenantCustomization/GetLogo?tenantId=" + LoginInformations?.Tenant?.Id;
        }
    }
}

index.cshtml

@using System.Threading.Tasks
@using MyCompanyName.AbpZeroTemplate.Web.Public.Startup
@using CultureHelper = MyCompanyName.AbpZeroTemplate.Localization.CultureHelper
@model MyCompanyName.AbpZeroTemplate.Web.Public.Controllers.PublicHomeIndexViewModel
@{
    ViewBag.CurrentPageName = FrontEndPageNames.Home;
}
@section Styles
{
    <link rel="stylesheet" href="~/assets/fancybox/source/jquery.fancybox.css" asp-append-version="true">
    <link rel="stylesheet" href="~/lib/owl.carousel/dist/assets/owl.carousel.css" asp-append-version="true">
}
@section Scripts
{
    <script src="~/assets/fancybox/source/jquery.fancybox.pack.js" type="text/javascript"></script><!-- pop up -->
    <script src="~/lib/owl.carousel/dist/owl.carousel.js" type="text/javascript"></script><!-- slider for products -->
    <script type="text/javascript">
        $(function () {
            Layout.initOWL();
        });
    </script>
}

<h1>
    WebSiteRootAddress:
</h1>
<h2>
    @Model.WebSiteRootAddress
</h2>
<h1>
    AdminWebSiteRootAddress:
</h1>
<h2>
    @Model.AdminWebSiteRootAddress
</h2>
<!-- BEGIN SERVICE BOX -->
<div class="row service-box margin-bottom-40">
.
.
.
</div>
<!-- END SERVICE BOX -->
<!-- BEGIN BLOCKQUOTE BLOCK -->
<div class="row quote-v1 margin-bottom-30">
    <div class="col-md-12">
        <span>ASP.NET Iteration Zero - Starting point for your next web project!</span>
    </div>
</div>
<!-- END BLOCKQUOTE BLOCK -->
<!-- BEGIN RECENT WORKS -->
<div class="row recent-work margin-bottom-40">
.
.
.
</div>
<!-- END RECENT WORKS -->
<!-- BEGIN TABS AND TESTIMONIALS -->
<div class="row mix-block margin-bottom-40">
    <!-- TABS -->
    <div class="col-md-7 tab-style-1">
	.
	.
	.
    </div>
    <!-- END TABS -->
    <!-- TESTIMONIALS -->
    <div class="col-md-5 testimonials-v1">
	.
	.
	.
    </div>
    <!-- END TESTIMONIALS -->
</div>
<!-- END TABS AND TESTIMONIALS -->
<!-- BEGIN STEPS -->
<div class="row margin-bottom-40 front-steps-wrapper front-steps-count-3">
.
.
.
</div>
<!-- END STEPS -->
<!-- BEGIN CLIENTS -->
<div class="row margin-bottom-40 our-clients">
.
.
.
</div>
<!-- END CLIENTS -->
  1. Do you host your Angular app and Host app under the same website on azure? I followed instructions here: Step By Step Publish To Azure

  2. Could you share your Startup.cs code ? Sent via email.

The app works flawlessly on localhost. The client is producing

WARN: Could not find localization source: AbpWeb

error message in the browser console, and this warning:

Showing 41 to 50 of 404 entries