roxiness / routify-starter

https://example.routify.dev/
198 stars 55 forks source link

Debugging "Your app should probably have loaded by now" #31

Closed ML-Chen closed 4 years ago

ML-Chen commented 4 years ago

After modifying the starter template and running npm run dev, I often get the error message from the splash screen "Your app should probably have loaded by now". There's nothing helpful logged in the console or the terminal where I ran npm run dev. How do I know what's going on?

Here's what I get from npm run build && npm run serve:

TypeError: Cannot read property 'URL' of null
    at new XMLHttpRequestImpl (D:\Git\FoodTruck\client\node_modules\jsdom\lib\jsdom\living\xhr\XMLHttpRequest-impl.js:110:32)
    at Object.setup (D:\Git\FoodTruck\client\node_modules\jsdom\lib\jsdom\living\generated\XMLHttpRequest.js:55:12)
    at new XMLHttpRequest (D:\Git\FoodTruck\client\node_modules\jsdom\lib\jsdom\living\generated\XMLHttpRequest.js:72:22)
    at eval (eval at <anonymous> (D:\Git\FoodTruck\client\node_modules\@sveltech\ssr\ssr.js:64:24), <anonymous>:15:3912307)
    at new Promise (<anonymous>)
    at SB (eval at <anonymous> (D:\Git\FoodTruck\client\node_modules\@sveltech\ssr\ssr.js:64:24), <anonymous>:15:3912206)
    at VB (eval at <anonymous> (D:\Git\FoodTruck\client\node_modules\@sveltech\ssr\ssr.js:64:24), <anonymous>:15:3916011)
    at async G (eval at <anonymous> (D:\Git\FoodTruck\client\node_modules\@sveltech\ssr\ssr.js:64:24), <anonymous>:15:3929939)
(node:6704) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'createElement' of undefined
(node:6704) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3) 
(node:6704) [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.

The website seems to run fine after building and deploying, however.

jakobrosenberg commented 4 years ago

Hi @ML-Chen That error means that either your routes didn't get generated or they got generated right after Rollup started, in which case Rollup misses it. This should be fixed in v1.5.3.

jakobrosenberg commented 4 years ago

@ML-Chen was it fixed with 1.5.3? :)

ML-Chen commented 4 years ago

Yup, upgrading Routify to 1.5.3 fixed the issue! npm run dev has a lot more helpful error messages now, and I don't see the "Cannot read property 'URL' of null" issue when building anymore.