ai icon indicating copy to clipboard operation
ai copied to clipboard

[BUG] "error when starting dev server"

Open ocg2347 opened this issue 5 months ago • 0 comments

I get this on:

  • Ubuntu 20.04.6 LTS
  • npm = 11.4.2
  • pnpm = 10.12.4

xxx:~$ git clone https://github.com/cloudflare/ai.git
Cloning into 'ai'...
remote: Enumerating objects: 9466, done.
remote: Counting objects: 100% (2283/2283), done.
remote: Compressing objects: 100% (655/655), done.
remote: Total 9466 (delta 1920), reused 1633 (delta 1627), pack-reused 7183 (from 1)
Receiving objects: 100% (9466/9466), 9.33 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (6938/6938), done.
xxx:~$ 
xxx:~$ cd ai/
xxx:~/ai$ 
xxx:~/ai$ pnpm i
Scope: all 46 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +1041
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1041, reused 1041, downloaded 0, added 1041, done

devDependencies:
+ @ai-sdk/openai 1.3.22
+ @biomejs/biome 2.0.6
+ @changesets/changelog-github 0.5.1
+ @changesets/cli 2.29.5
+ @clack/prompts 0.11.0
+ @cloudflare/workers-oauth-provider 0.0.5
+ @langchain/core 0.3.61
+ @modelcontextprotocol/sdk 1.13.1
+ @repo/aicli 0.0.1 <- tools/aicli
+ @types/ejs 3.1.5
+ @types/node 24.0.8
+ @types/wait-on 5.3.4
+ agents 0.0.100
+ ai 4.3.16
+ chalk 5.4.1
+ dayjs 1.11.13
+ dotenv 17.0.1
+ ejs 3.1.10
+ eventsource-parser 3.0.3
+ fetch-event-stream 0.1.5
+ get-port 7.1.0
+ globals 16.3.0
+ handlebars 4.7.8
+ hono 4.8.3
+ husky 9.1.7
+ langchain 0.3.29
+ marked 16.0.0
+ miniflare 4.20250617.4
+ msw 2.10.2
+ nx 21.2.1
+ tsup 8.5.0
+ tsx 4.20.3
+ typescript 5.8.3
+ vite 7.0.0
+ vitest 3.2.4
+ wait-on 8.0.3
+ wrangler 4.22.0
+ zod 3.25.67

╭ Warning ─────────────────────────────────────────────────────────────────────────────────╮
│                                                                                          │
│   Ignored build scripts: nx, sharp.                                                      │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run          │
│   scripts.                                                                               │
│                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────╯

packages/workers-ai-provider prepare$ pnpm build
[3 lines collapsed]
│ CLI Using tsconfig: tsconfig.json
│ CLI tsup v8.5.0
│ CLI Target: es2020
│ ESM Build start
│ ESM dist/index.js     30.38 KB
│ ESM dist/index.js.map 65.65 KB
│ ESM ⚡️ Build success in 17ms
│ DTS Build start
│ DTS ⚡️ Build success in 365ms
│ DTS dist/index.d.ts 6.66 KB
└─ Done in 1.4s
. postinstall$ nx run-many --target=build --projects='packages/*'
[27 lines collapsed]
│ CJS dist/index.js.map 16.50 KB
│ CJS ⚡️ Build success in 14ms
│ ESM dist/index.mjs     8.49 KB
│ ESM dist/index.mjs.map 16.44 KB
│ ESM ⚡️ Build success in 15ms
│ DTS Build start
│ DTS ⚡️ Build success in 558ms
│ DTS dist/index.d.ts  2.56 KBs
│ DTS dist/index.d.mts 2.56 KBs
│  NX   Successfully ran target build for 2 projects
└─ Done in 2s
. prepare$ if [ "$CI" ]; then echo 'Skipping husky setup in CI'; else husky; fi
└─ Done in 85ms
Done in 9.2s using pnpm v10.12.4
xxx:~/ai$ cd playground/ai/
xxx:~/ai/playground/ai$ 
xxx:~/ai/playground/ai$ npm start

> start
> vite dev

error when starting dev server:
Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:159:15)
    at writeGeneric (node:internal/stream_base_commons:150:3)
    at Socket._writeGeneric (node:net:966:11)
    at Socket._write (node:net:978:8)
    at writeOrBuffer (node:internal/streams/writable:570:12)
    at _write (node:internal/streams/writable:499:10)
    at Writable.write (node:internal/streams/writable:508:10)
    at Runtime.updateConfig (/home/vv-ai/ai/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:11668:26)
    at async #assembleAndUpdateConfig (/home/vv-ai/ai/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:20817:30)
    at async Mutex.runWith (/home/vv-ai/ai/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:2197:48)

ocg2347 avatar Jul 17 '25 07:07 ocg2347