Can't find the cause of the error

I am building a simpe app using Cloudflare functions / Cloudflare pages / astrobuild. The error I am struggling with has manifisted itself later in the project when I started adding more functions files. Below I have put the content of the error. I have no idea what causes the error. All I am doing in the function is fetching data from the db or just handling the request and sending text message back

  (error) Error: To use the new ReadableStream() constructor, enable the streams_enable_constructors feature flag.
✘ [ERROR]   Error: The script will never generate a response.