question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnhandledPromiseRejectionWarning: Error: Multiple root routing modules found

See original GitHub issue

I am trying to do npx angular-prerender after I doing a successful ng build

I got this error: PS C:\Development\xyz\ClientApps> npx angular-prerender (node:1384) UnhandledPromiseRejectionWarning: Error: Multiple root routing modules found C:\Development\xyz\ClientApps\libs\shared\src\lib\shared-routing.module.ts, C:\Development\xyz\ClientApps\apps\website\src\app\app.module.ts, C:\Development\xyz\ClientApps\libs\about\src\lib\about-routing.module.ts, C:\Development\xyz\ClientApps\libs\agent\src\lib\agent-routing.module.ts, C:\Development\xyz\ClientApps\libs\camp\src\lib\camp-routing.module.ts, C:\Development\xyz\ClientApps\libs\flight\src\lib\flight-routing.module.ts, C:\Development\xyz\ClientApps\libs\game\src\lib\game-routing.module.ts, C:\Development\xyz\ClientApps\libs\giftcard\src\lib\gift-card-routing.module.ts, C:\Development\xyz\ClientApps\libs\home\src\lib\home-routing.module.ts, C:\Development\xyz\ClientApps\libs\profile\src\lib\profile-routing.module.ts, C:\Development\xyz\ClientApps\libs\trip\src\lib\trip-routing.module.ts at findRootModule (C:\Development\xyz\ClientApps\node_modules\guess-parser\dist\guess-parser\index.js:412:15) at exports.parseRoutes (C:\Development\xyz\ClientApps\node_modules\guess-parser\dist\guess-parser\index.js:575:31) at prerender (C:\Development\xyz\ClientApps\node_modules\angular-prerender\build\node\functions\prerender.js:89:54) (node:1384) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1384) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I have 3 angular apps and several libraries, but I tried to prerender the default app.

here are my configurations: ng --version

 _                      _                 ____ _     ___ 
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/

Angular CLI: 8.3.6 Node: 12.4.0 OS: win32 x64 Angular: 8.2.8 … animations, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic
… platform-server, router, service-worker, upgrade

Package Version

@angular-devkit/architect 0.803.3 @angular-devkit/build-angular 0.803.6 @angular-devkit/build-ng-packagr 0.803.6 @angular-devkit/build-optimizer 0.803.6 @angular-devkit/build-webpack 0.803.6 @angular-devkit/core 8.3.6 @angular-devkit/schematics 8.3.6 @angular/cdk 8.2.2 @angular/cli 8.3.6 @angular/http 7.2.15 @angular/material 8.2.2 @angular/material-moment-adapter 8.2.2 @angular/pwa 0.803.6 @ngtools/webpack 8.3.6 @nguniversal/common 8.1.1 @nguniversal/express-engine 8.1.1 @nguniversal/module-map-ngfactory-loader 8.1.1 @schematics/angular 8.3.6 @schematics/update 0.803.6 ng-packagr 5.5.1 rxjs 6.5.3 typescript 3.5.3 webpack 4.39.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisguttandincommented, Oct 29, 2019

Hi @keserwan, I just published another patch release. Can you please try once more with version 4.1.22. Many thanks in advance.

1reaction
keserwancommented, Oct 22, 2019

Sorry for the late reply, I will check tomorrow and let you know, thank you very much for your contributions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Routes not found in angular routing with multiple child modules
I have a parent module and a number of child modules. Parent module routing works but none of the child routes work: Error:...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >
Node.js Rest APIs example with Express, Sequelize & MySQL
In this tutorial, I will show you step by step to build Node.js Restful CRUD API using Express, Sequelize with MySQL database. You...
Read more >
I'm trying to connect mongoDB to my web app but it shows ...
parseOptions (D:\whatsapp\signal-backend\node_modules\mongodb\lib\ ... I suspect you may have an error in your connection string or are ...
Read more >
Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found