The closest I have found to a solution was: https://forum.nim-lang.org/t/7181
If you want to reproduce...there is a gitpod of it that can be opened in the browser here https://github.com/hortinstein/enkodo or it can be cloned locally.
I have tried tweaking the source files since it appears to be a parser bug...any ideas on workarounds and if I need to file a bug report? Thank you!
I was able to fix it. It was because serEncObj (one of the function parameters) was a generic.
Ideally jsffi would provide a nicer error message, but casting it explicitly fixed my issue