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

Error then using async function and filters #37

Open
devalexqt opened this issue Oct 27, 2020 · 0 comments
Open

Error then using async function and filters #37

devalexqt opened this issue Oct 27, 2020 · 0 comments
Assignees
Labels
in progress Looking for good solution to fix current issue

Comments

@devalexqt
Copy link

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.
@radiocity radiocity self-assigned this Oct 27, 2020
@radiocity radiocity added the in progress Looking for good solution to fix current issue label Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in progress Looking for good solution to fix current issue
Projects
None yet
Development

No branches or pull requests

2 participants