Skip to content

[BUG] Error: [unenv] Readable.asyncIterator is not implemented yet! #147

@martcarrefour

Description

@martcarrefour

Describe the bug

When calling a server action from a client component in a Next.js application, the following error occurs during runtime(cloudflare logs)

{
  "message": "Error: [unenv] Readable.asyncIterator is not implemented yet!",
  "level": "error",
  "$cloudflare": {
    "event": {
      "request": {
        "url": "https://frontend-staging.12345.biz/create",
        "method": "POST",
        "path": "/create"
      }
    },
    "scriptName": "frontend-dev",
    "eventType": "fetch",
    "executionModel": "stateless",
    "scriptVersion": {
      "id": "231baf04-e629-3456-ab0f-ce69779f5e0f"
    },
    "truncated": false,
    "$metadata": {
      "requestId": "8ea3213eb2f39a"
    }
  }
}

Steps to reproduce

Create a server action file (testFN.ts):

"use server";

export async function testFN() {
  console.log("test");
}

Use it in a client component:

"use client";

import { testFN } from "./testFN";

export default function ButtonComponent() {
  return <button onClick={() => testFN()}>TEST</button>;
}

Expected behavior

The server action should execute successfully, and the console.log message should appear in the server logs.

@opennextjs/cloudflare version

experimental

Node.js version

22.11.0

Wrangler version

3.87.0

next info output

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 49084
  Available CPU cores: 16
Binaries:
  Node: 22.11.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.15 // An outdated version detected (latest is 15.0.3), upgrade is highly recommended!
  eslint-config-next: 14.2.15
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A
 ⚠ An outdated version detected (latest is 15.0.3), upgrade is highly recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions