ExpressJS Twig module not allowing async despite setting the options accordingly

360 Views Asked by At

I'm trying to load an array from mongoose into a twig rendered list , blocking on an error that says:

TwigException: You are using Twig.js in sync mode in combination with async extensions.

So I've followed the instructions in the official twigjs documentation , yet even with :

app.set("twig options",{allow_async:true}) 

it's not working! Can anyone help ?

1

There are 1 best solutions below

0
On

So this was a version issue , the updated version (actual : 1.15.0 ) doesn't really allow for async (defunct) , however a rollback to version 1.12.0 successfully corrected the issue.