eta
eta copied to clipboard
“strng.replace” is not a function
Describe the bug ETA attempts to use “strng.replace”, which does not exist of course.
To Reproduce Steps to reproduce the behavior:
- Use eta.Render function as intended.
Expected behavior ETA should use string.replace, not strng.replace. This would avoid the error(?) Screenshots If applicable, add screenshots to help explain your problem.
Package & Environment Details
- Environment: NodeJS
- Version: 16.13.2
This problem doesn't come out of string.replace
being used instead, strng
is an internal variable used inside of the parsing function, and is used for whitespace trimming. Could you share what exactly your template is, because it doesn't seem this problem is showing up at all for me.
Closing this as stale.
Still having the problem. How does one reopen an issue?
@ScolderCreations could you send me a reproducible example of the error?
I was able to reproduce this by mistakenly passing a Buffer
to Eta.renderString
instead of a String
. I got the buffer from calling fs.readFile
without an encoding argument.