Repository: next.js
Issue: TypeError: value.forEach is not a function when use server action on local
Labels: create-next-app,bug

### Link to the code that reproduces this issue

https://github.com/nottnt/nextjs-dashboard

### To Reproduce

I implemented next dashboard by this chapter [mutating-data](https://nextjs.org/learn/dashboard-app/mutating-data) 

code that I implemented:
`app/ui/invoices/buttons.tsx`
![image](https://github.com/vercel/next.js/assets/33511398/d39f8f16-bcf4-44dd-a6be-59e07d6f41ff)

`app/lib/actions.ts`
![image](https://github.com/vercel/next.js/assets/33511398/e2ac2cab-aa33-48d5-919d-b9310ef93ebb)




### Current vs. Expected behavior

current: I found this error when I use server action on local build but it's work at `vercel` server
![image](https://github.com/vercel/next.js/assets/33511398/19a245d5-e4a3-4e32-92a5-c1b47aa34931)

expect: I want to know how to solve it?

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 18.20.1
  npm: 10.5.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

create-next-app

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

### Additional context

I try to remove `yarn.lock` and `node_module` before update my node version from `v18.17.1` to `v20.13.1` and these package `next@latest react@latest react-dom@latest eslint-config-next@latest` and follow this instruction https://github.com/vercel/next.js/issues/55932 

 it's not work as well I'm not sure is it bug?
 
 My package.json
 
 ```
 {
  "private": true,
  "scripts": {
    "build": "next build",
    "dev": "next dev",
    "prettier": "prettier --write --ignore-unknown .",
    "prettier:check": "prettier --check --ignore-unknown .",
    "seed": "node -r dotenv/config ./scripts/seed.js",
    "start": "next start"
  },
  "dependencies": {
    "@heroicons/react": "^2.0.18",
    "@tailwindcss/forms": "^0.5.7",
    "@types/node": "20.5.7",
    "@vercel/postgres": "^0.5.0",
    "autoprefixer": "10.4.15",
    "bcrypt": "^5.1.1",
    "clsx": "^2.0.0",
    "next": "^14.2.3",
    "postcss": "8.4.31",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "tailwindcss": "3.3.3",
    "typescript": "5.2.2",
    "use-debounce": "^10.0.0",
    "zod": "^3.22.2"
  },
  "devDependencies": {
    "@types/bcrypt": "^5.0.1",
    "@types/react": "18.2.21",
    "@types/react-dom": "18.2.14",
    "@vercel/style-guide": "^5.0.1",
    "dotenv": "^16.3.1",
    "eslint": "^8.52.0",
    "eslint-config-next": "^14.2.3",
    "eslint-config-prettier": "9.0.0",
    "prettier": "^3.0.3",
    "prettier-plugin-tailwindcss": "0.5.4"
  },
  "engines": {
    "node": ">=20.x"
  }
}

 ```