Ng build with routing loadchildren


Topic: Ng build with routing loadchildren

dtrainor pro asked 7 years ago

I down loaded the quickstart zip file and I am unable to build my app if I have loadchildren in my routing module - I get the following error C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp>ng build17% building modules 61/70 modules 9 active ...Wire-WebApp\\node_modules\\util\\util.jsAn error occured during the build:Error: No module factory available for dependency type: ContextElementDependencyat Compilation.addModuleDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:213:21)at Compilation.processModuleDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:202:8)at _this.buildModule.err (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:350:14)at building.forEach.cb (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:147:27)at Array.forEach (native)at callback (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:147:13)at module.build (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:174:11)at resolveDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModule.js:165:4)at ContextModule.result.resolveDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@ngtools\\webpack\\src\\plugin.js:275:25)at ContextModule.build (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModule.js:105:8)at Compilation.buildModule (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:149:10)at factoryCallback (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:337:12)at C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModuleFactory.js:96:13at C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\tapable\\lib\\Tapable.js:268:11at done.then (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@ngtools\\webpack\\src\\plugin.js:277:28)No module factory available for dependency type: ContextElementDependencyError: No module factory available for dependency type: ContextElementDependencyat Compilation.addModuleDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:213:21)at Compilation.processModuleDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:202:8)at _this.buildModule.err (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:350:14)at building.forEach.cb (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:147:27)at Array.forEach (native)at callback (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:147:13)at module.build (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:174:11)at resolveDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModule.js:165:4)at ContextModule.result.resolveDependencies (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@ngtools\\webpack\\src\\plugin.js:275:25)at ContextModule.build (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModule.js:105:8)at Compilation.buildModule (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:149:10)at factoryCallback (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\Compilation.js:337:12)at C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@angular\\cli\\node_modules\\webpack\\lib\\ContextModuleFactory.js:96:13at C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\tapable\\lib\\Tapable.js:268:11at done.then (C:\\Users\\David\\Documents\\Projects\\LogicSnap\\LymWire\\CrimeWire\\CrimeWire-WebApp\\node_modules\\@ngtools\\webpack\\src\\plugin.js:277:28)

Dawid Adach pro answered 7 years ago

Hi dtrainor. Could you send me your code to a.mroczek@mdbootstrap.com? I need to know more than your stacktrace. Best Regards, Alan Mroczek.

dtrainor pro commented 7 years ago

I sent you the code - is there any update on this ?

Dawid Adach pro answered 7 years ago

Hi again dtrainor. I've downloaded your code, and I'm getting errors in compilation faze. It doesn't look like problem with MDB itself , because when I commented it out, nothing changed. However, there might be some issues with lazy loading, because we aren't currently supporting this feature. Best Regards, Alan Mroczek.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No