invertase / docs.page

Instant Open Source docs with zero configuration.
https://docs.page
Apache License 2.0
458 stars 76 forks source link

bug: Page with TS codeblocks causes Internal Server Error #364

Closed DoctorJohn closed 3 weeks ago

DoctorJohn commented 4 weeks ago

Starting a few days a go one of the react-native-google-mobile-ads pages started showing the following error message:

![image](https://github.com/user-attachments/assets/ad7b15cb-178f-49ab-9dcc-3b20c869fcf4)

The page used to work flawlessly before, so I assume this has something to do with #359. Checking the browsers dev tools reveals that the GET request to https://docs.page/invertase/react-native-google-mobile-ads/impression-level-ad-revenue results in an internal server error (status 500).

I narrowed the problem down to the following two codeblocks in our docs:

https://github.com/invertase/react-native-google-mobile-ads/blob/b4443b473bba2322b8b7f0b80ed9cd7689af8f0a/docs/impression-level-ad-revenue.mdx?plain=1#L26-L39

Removing them OR(!) switching their language from ts to tsx resolved the problem, which can be verified by looking at the preview of the branch I used for debugging.

Ehesp commented 3 weeks ago

@DoctorJohn Thanks for reporting. This was because of the twoslash rendering which has now been removed. Unfortunately it can't handle external types without them being explicitly installed which won't work for docs.page.

The page is live again.