I encountered a roadblock with my Npm start process when it got stuck at 70% completion after incorporating the "lazy

I have encountered a problem that has previously been discussed here, but none of the solutions seem to work for me. I recently incorporated this module into an existing project:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from '../BackOffice/components/dashboard.component';

const routes: Routes = [
  {
    path: '',
    component: DashboardComponent,
    pathMatch: 'full'
  }];

@NgModule({
  imports: [
      CommonModule,
      RouterModule.forChild(routes)
  ],
  declarations: [DashboardComponent]
})
export class LazyModule { }

In my app.module:

 { path: 'lazy', loadChildren: 'app/lazy/lazy.module#LazyModule' },

However, when running "npm start," it gets stuck at 70% completion:

If I remove the module, everything builds correctly. Just wanted to mention that this is in Angular 4. Thank you.

Answer №1

Are you attempting to access a module that is set up as lazy-loaded in the directory labeled lazy?

I've reviewed your folder structure here. However, there doesn't seem to be a directory named 'lazy' in there.

Where can I find your LazyModule class located?

If it's stored in a different directory, you can add the following code snippet within your AppModule:

 { path: 'lazy', loadChildren: './<your-deirectory-name>/lazy.module#LazyModule' },

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Mapping JSON to interface in Angular 7: A step-by-step guide

I am currently working with angular7 and I have a requirement to map a json object to my interface. My goal is to create a function that can accurately map the fields of the json object to the corresponding properties in the interface. Additionally, if the ...

Encountering problem while upgrading Angular Material from version 13 to 14 - error TS2307: Module '@angular/material/core/common-behaviors/constructor' not found

While upgrading Angular and Angular Material from version 13.2.6 to 14.2.2, I encountered the following challenges: Error TS2307: Module '@angular/material/core/common-behaviors/constructor' or its type declarations cannot be found. Error TS2345 ...

When attempting to send a token from an account to a marketplace in ERC721, the transfer caller must either be the owner

Currently, I am in the process of transferring my NFT to a marketplace pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import & ...

Slideshow through each item using Typescript and Angular8

I came across a solution in this carousel on by one link, but I'm struggling to work with the jQuery code even though I have JQuery installed in my project. For example: const next = jQuery(this).next(); I am looking to convert the JQuery code from ...

I'm curious about the significance behind the npm view dependencies display

While running the command npm view <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="244f4556494564140a15160a">[email protected]</a> dependencies, the way dependencies are shown varies. Can someone explain why some depen ...

Tips for incorporating Material UI Icon v1.0.0-beta.36 into a .tsx component

Currently utilizing material-ui-icons v1.0.0-beta.36. I am endeavoring to incorporate a Search icon within a .tsx component. .tsx component: import React, { Component, ReactElement } from 'react' import Search from 'material-ui-icons/Sear ...

Declare, condition, and output all in a single statement

Is there a method to condense the content inside the function below into a single line? I want to avoid declaring check. function Example { const check = this.readByUuidCheck(props) if (check) return this.readByUuid(check) } I am seeking ways to ...

Eliminate properties from a TypeScript interface object

After receiving a JSON response and storing it in MongoDB, I noticed that unnecessary fields are also being stored in the database. Is there a way to remove these unnecessary fields? interface Test{ name:string }; const temp :Test = JSON.parse('{ ...

Utilize the object's ID to filter and display data based on specified criteria

I retrieved an array of objects from a database and am seeking to narrow down the results based on specific criteria. For instance, I want to display results only if a user's id matches the page's correct id. TS - async getResultsForId() { ...

Encountering an issue when attempting to execute "npm run watch" due to an error message related to "gulp"

Recently, I encountered an issue with my web starter kit from the Coding Phase GitHub repository. Everything was working fine until I decided to run npm run watch and started receiving error messages. It seems like this problem began after I updated Node ...

The feature similar to SignalR is currently experiencing technical difficulties and is not

In my application, I have implemented a like functionality for posts. To achieve real-time updates on the number of likes, I explored SignalR and attempted to integrate it into my code. Unfortunately, despite not encountering any errors, the automatic upda ...

Exploring the idea of nesting Angular components with dynamic data

I am attempting to create a nested structure using multiple components in the following way. My objective is to pass user data into the user-item component without directly including the item component inside the list component. Main-App <app-user-li ...

Error message in Visual Studio 2017: Identical name 'URLs' declared twice in

In our Visual Studio 2017 project, we have multiple TypeScript files that define a URLs class. Each file contains different implementations of the class to change site URLs based on the specific use case: customer/urls.ts namespace Portal { export cl ...

Move the vertex onto the mxGraph canvas using drag-and-drop functionality

Hey there, I'm currently working on dragging and dropping a vertex from the create button onto the mxGraph canvas, similar to how it's done in draw.io. This is what my TS code looks like: addShape(shape: string,event) { event.stopPropagation(); ...

Tips for effectively handling Node.JS modules within your organization

What is the best approach for managing internal modules within a node.js application? Currently, our application is quite large with multiple dependencies installed via npm. We have added node_modules to our .gitignore file to ensure it doesn't get i ...

Module 'swagger_params_parser' is missing and cannot be located

I recently upgraded my Swagger NodeJS project from using swagger-connect 0.1.0 to version 0.7.0 by following the manual instructions. This involved making changes to the default.yml file as shown below: _swagger_params_parser: # <= A ...

Integrating one service into another allows for seamless access to the imported service's properties and methods within an Angular

After reviewing the content at https://angular.io/guide/dependency-injection-in-action, it appears that what I am trying to achieve should be feasible. However, I encounter this error when attempting to invoke a method on my injected service from another s ...

Encountering a Error with Vue-cli: EEXIST - File already exists at specified location when running npm run dev command. The error is related to creating a directory at 'C:UserProject

After installing vue-cli, running the command "npm run dev" to start the server results in this error message: The same error also occurs when executing the "npm Install" command. ...

Issue with ADFS 2016 oAuth: Users not being redirected to login page post logout

Having an issue with ADFS 2016 and my Angular application using ng2-adal js for authentication and authorization. After users logout, they are not redirected back to the login page. Debug traces in Event Viewer show the following error: Error: OAuthSignou ...

Encountering problems with TypeScript in a Node application when using the package manager

I am facing an issue while trying to package my node app into an exe using "pkg". I work with TypeScript, and when I attempt to run pkg index.ts --debug, an error pops up. Node.js v18.5.0 Warning Failed to make bytecode node18-x64 for file /snapshot/ ...