Unable to prerender all routes!
See original GitHub issueHello everyone, everything good? I am in trouble, when I run the command npm run build this message appears:
[prerender-spa-plugin] Unable to prerender all routes! (node:24767) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Protocol error (Page.navigate): Cannot navigate to invalid URL undefined (node:24767) [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.
But my app has a protection (main.js) that depends on a choice to continue.
router.beforeEach((to, from, next) => {
// check if the user item is already set
if (to.path !== '/painel' && !window.sessionStorage.getItem('programaId')) {
next('painel')
} else {
next()
}
})
My question is: is there a way to trigger prerender after that choice?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Unable to prerender all routes! · Issue #242 - GitHub
Unable to prerender all routes ! I'm using v3.3.0 with the latest PR from Tribex. I'm watching the routes come up in headless...
Read more >How to fix [prerender-spa-plugin] Unable to prerender all routes
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >ERROR [prerender-spa-plugin] - Unable to prerender all routes
I have encountered a problem in implementing the prerender-spa-plugin with Laravel 5.7 and Vue 2.6: Error: Child compilation failed: Entry ...
Read more >prerender-spa-plugin - Bountysource
[prerender-spa-plugin] Unable to prerender all routes! (node:2685) UnhandledPromiseRejectionWarning: Error: Navigation Timeout Exceeded: 30000ms exceeded at ...
Read more >How to prerender a Vuejs 3 application with Vue Cli? - Get Help
After that I try prerender-spa-plugin but I have an error wheh I make a npm run build : [prerender-spa-plugin] Unable to prerender all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I put
headless: false
, opened the Chromium, but I could not identify what it was, I went in the config I took the event to run after the element exists, then finished the construction. I opened the dist folder and had a ‘/panel’ index, even though it ran the other routes, it did not work the way I imagined it to. Thanks for the effort!You could use
renderAfterDocumentEvent
and dispatch an event after the relevant components mount. However, it would appear your config contains anundefined
value as a route, which is causing the error here.