Closed tzwel closed 9 months ago
Looks like this is unrelated to ejs and happens with jade and mustache as well https://stackoverflow.com/questions/31329578/why-does-adding-a-css-link-to-my-jade-template-make-my-node-app-crash https://stackoverflow.com/questions/57242584/page-crashes-whenever-i-link-a-css-stylesheet-on-one-file-but-doesnt-on-anothe
I'll keep this issue open for a while because there's no clear solution for this afaik
<link rel="stylesheet" href="/card.css">
A single slash like this fixed the problem. Why, I have no idea
I'm debugging this for over two hours already
This is the returned user object
The user gets logged correctly (if the template is mostly empty), ejs renders the template correctly, but logs this error in the console:
Cannot read properties of null (reading 'id')
Once I add CSS into the template
<link rel="stylesheet" href="/card.css">
I get this erroruser.id
becomes completely unusable everywhere and will just crash nodeThis is the weirdest bug i have ever encountered, I am not even sure if this is linked to ejs in any way. The bug seems to change its behavior in some random circumstances I can not pinpoint