Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Error then using async function and filters #37

@devalexqt

Description

@devalexqt

Then I try to add async function, for example:

functions:{
   getFileInfo:(value,...args)=>{
      return new Promise((resolve,reject)=>{
          setTimeout(()=>{
              // get file info from DB
               return resolve(JSON.stringify(require("./demo_data/file_data.js")))//info about file
            },3000)
       })//promise
   },//getFileInfo
}

I got error:

NonErrorEmittedError: (Emitted value instead of an instance of Error) TwigException: You are using Twig.js in sync mode in combination with async extensions.

Metadata

Metadata

Assignees

Labels

in progressLooking for good solution to fix current issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions