ng-toolkit
ng-toolkit copied to clipboard
Cannot read property 'unshift' of undefined
When i tried to add ng add @ng-toolkit/universal to my angular app its showing these errors:
-
ERROR: Cannot read property 'unshift' of undefined
-
INFO: stacktrace has been sent to tracking system. For more info about my workspace: / \ _ __ __ _ _ | | __ _ _ __ / | | | | / △ \ | ' \ / _
| | | | |/ _
| '| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/
Angular CLI: 8.1.3 Node: 12.13.0 OS: win32 x64 Angular: 8.1.3 ... animations, cli, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router
Package Version
@angular-devkit/architect 0.801.3 @angular-devkit/build-angular 0.801.3 @angular-devkit/build-optimizer 0.801.3 @angular-devkit/build-webpack 0.801.3 @angular-devkit/core 8.1.3 @angular-devkit/schematics 8.1.3 @ngtools/webpack 8.1.3 @schematics/angular 8.1.3 @schematics/update 0.801.3 rxjs 6.4.0 typescript 3.4.5 webpack 4.35.2
Any help would be appreciated. Thanks in advance ;-)
Do you use lazy loading somewhere on routing definitions?
Thanks for the response @KingDarBoja. Yeah. I've used lazzy loading on app-routing.module.ts file and then imported as usual app.module.ts. thing is its worked for me if i do "ng serve", when i tried to prod build its triggering this issue.
Having this same issue. Also using lazy loading on routes.