Hi @ewafula
I believe your issue is related to requiring contact-summary-extras
in task code.
My guess is that the error is caused by that file requiring an external library, moment
, to process dates. It’s a known issue that task code cannot use moment
right now: compile-app-settings - Nools can't process scripts which `require('moment')` · Issue #225 · medic/cht-conf · GitHub
Luckily, we have an identical function to getField
available in another library, nools-extras
that you can use safely. Can you please try changing your code to:
const { getField } = require('./nools-extras');
.... <no changes are required in the task definition>
Let us know how that goes.