Base solution for your next web application
Open Closed

Error executing angular app out of the box #12571


User avatar
0
angel.segura created

Hello, we have this solution:

we download the package, and out of the box, in some machines we have this error related to prime-ng :

What could be happening?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

7 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @angel.segura

    If you're downloading the project fresh, it's recommended that you download the v14.3.0 ASP.NET Zero version. After ensuring that you've correctly installed the npm packages in the Angular project in v14.0.0, have you run the npm run create-dynamic-bundles or yarn create-dynamic-bundles command to create the style and script bundles? Can you verify this? If these steps don't resolve your issue, can you remove the node_modules file and reinstall the npm packages? If the issue persists, please feel free to contact us.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    angel.segura created

    Hello, still the exact same error.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @angel.segura

    We haven't been able to reproduce this issue ourselves. Just to be sure, could you delete the node_modules folder and then reinstall the NPM packages using only yarn? If this doesn't solve the problem, could you please send us a zip of your project without deleting any folders like node_modules to [email protected] (You mentioned a clean project, but we're asking for this to verify your installations and downloads)? Maybe we can find out what's causing this issue through the project.

    Thanks.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    angel.segura created

    Nothing worked. zip sent by email

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @angel.segura

    In the ngOnInit() method within the PermissionTreeModalComponent, loadAllPermissionsToFilterTree() is called, and this method attempts to set the value of this.permissionTree.editData. However, the permissionTree reference is a @ViewChild and points to the <permission-tree> component within the modal. Because this component wasn't added to the DOM before the modal was opened, this.permissionTree is undefined and throws a null reference error.

    export class PermissionTreeModalComponent extends AppComponentBase implements OnInit {
        private _permissionsLoaded = false;
            
        constructor(injector: Injector, private _permissionService: PermissionServiceProxy) {
            super(injector);
        }
    
        ngOnInit(): void {
            // Don't load permissions here, wait for modal to open
        }
    
        openPermissionTreeModal(): void {
            if (!this._permissionsLoaded) {
                this.loadAllPermissionsToFilterTree();
                this._permissionsLoaded = true;
            }
            this.permissionTreeModal.show();
        }
        //...
     }
    

    Could you apply this change on your end? This will solve your problem. You will need to do the same for other sections where the Tree modal is used.

    If the problem persists, please do not hesitate to contact us.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    angel.segura created

    Hello, still doesn't work. We've re-formatted the computer, reinstalled even the SO W11 and the error remains. It is kind of urgent, Thanks

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @angel.segura

    I hope you're doing well. I wanted to follow up regarding the issue we discussed earlier. Could you please let me know if the problem still persists or if there have been any updates on your side?

    Thank you in advance

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)