how can I mount the `createPlaywrightRouter()` properly?
I don't understand why crawlee is throwing an error about adding a router for the label
undefined
.
here's my code:
Which I'm importing into the main.ts
file:
TypeScript is happy with it, so I'm not sure why I get this error:5 Replies
xenial-blackOP•2y ago
here are the logs
xenial-blackOP•2y ago
as an info:
I do need an input value within the routeHandler which is why I have the
createRouter
function, which then return the router.
I now tried the following but this also wouldn't work:
But still getting the same error. 🤔
I've also tried to use the createPlaywrightRouter()
factory together with addDefaultHandler
, but to no avail:
@p6l.richard just advanced to level 2! Thanks for your contributions! 🎉
equal-aqua•2y ago
Here is the proper way to implement router. Please, try it out.
xenial-blackOP•2y ago
Thanks, Oleg.
Ultimately, it was a bundle issue -- I'm now simply bundling everything into a single file and the routes are properly included.