1👍
When navigation to the page works but direct access does not, that is a sign that there are issues with server-side rendering. The first access to a page is rendered on the server by default which can cause issues.
E.g. your page code has to avoid accessing any browser APIs outside of onMount
as those will not be available on the server. Check the console of the server process and the console in the browser for errors.
You can also turn off SSR by adding an export to +page.js
/ts
.
export const ssr = false;
I would only recommend this for finding out whether SSR is the problem. Turning it off permanently should only be done in rare occasions when absolutely necessary.
- Chartjs-How to remove the inside-border from a single-element doughnut chart? Chart.js
- Chartjs-Chart in $refs cannot be referenced
Source:stackexchange.com