UI-TARS-desktop icon indicating copy to clipboard operation
UI-TARS-desktop copied to clipboard

[Bug Report]: zod cause pnpm i fail

Open tyzamTsing opened this issue 8 months ago β€’ 2 comments

Version

1.0.0 alpha7

Issue Type

  • [x] Select a issue type πŸ‘‡
  • [ ] Agent Core
  • [ ] MCP
  • [ ] Search
  • [x] Browser
  • [x] Setting
  • [ ] UI
  • [x] Other (please specify in description)

Model Provider

  • [ ] Select a model provider πŸ‘‡
  • [ ] Anthropic
  • [x] OpenAI
  • [ ] Azure OpenAI
  • [ ] Other (please specify in description)

Search Provider

  • [ ] Select a model provider πŸ‘‡
  • [x] Local Browser Search
  • [ ] Travily
  • [ ] Duckduckgo
  • [ ] SearXNG
  • [ ] Other (please specify in description)

Problem Description

when I run "pnpm I",always got zod error ,my node is v23.10.0, pls help me how to solve it.

Error Logs

sc@cc UI-TARS-desktop % pnpm i
Scope: all 30 workspace projects Lockfile is up to date, resolution step is skipped Packages: +2597 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  WARN  Failed to create bin at /private/tmp/UI-TARS-desktop/apps/agent-tars/node_modules/.bin/mcp-server-browser. ENOENT: no such file or directory, chmod '/private/tmp/UI-TARS-desktop/apps/agent-tars/node_modules/@agent-infra/mcp-server-browser/dist/index.cjs'  WARN  Failed to create bin at /private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-client/node_modules/.bin/mcp-server-browser. ENOENT: no such file or directory, chmod '/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-client/node_modules/@agent-infra/mcp-server-browser/dist/index.cjs' node_modules/@computer-use/mac-screen-capture-permissions: Running install script, done in 1.1s node_modules/bufferutil: Running install script, done in 950ms node_modules/core-js: Running postinstall script, done in 51ms node_modules/esbuild: Running postinstall script, done in 75ms node_modules/fs-xattr: Running install script, done in 1.5s node_modules/macos-alias: Running install script, done in 1.3s node_modules/puppeteer: Running postinstall script, done in 129ms node_modules/sharp: Running install script, done in 5.6s node_modules/tsx/node_modules/esbuild: Running postinstall script, done in 93ms node_modules/utf-8-validate: Running install script, done in 1.1s node_modules/@parcel/watcher: Running install script, done in 39ms node_modules/electron: Running postinstall script, done in 62ms node_modules/electron-winstaller: Running install script, done in 36ms packages/ui-tars/electron-ipc/node_modules/electron: Running postinstall script, done in 59ms  WARN  Failed to create bin at /private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-client/node_modules/.bin/mcp-server-browser. ENOENT: no such file or directory, chmod '/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-client/node_modules/@agent-infra/mcp-server-browser/dist/index.cjs'  WARN  Failed to create bin at /private/tmp/UI-TARS-desktop/apps/agent-tars/node_modules/.bin/mcp-server-browser. ENOENT: no such file or directory, chmod '/private/tmp/UI-TARS-desktop/apps/agent-tars/node_modules/@agent-infra/mcp-server-browser/dist/index.cjs' packages/agent-infra/logger prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > rslib build β”‚ Rslib v0.5.3 β”‚ ready built in 0.27 s (esm) β”‚ ready built in 0.27 s (cjs) └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ start Generating DTS... (esm)[email protected] build └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ start Generating DTS... (cjs)ystem prepare$ npm run build └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm)ild && shx chmod +x dist/.js β”‚ ready DTS generated in 1.98 s (esm) └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm)ild && shx chmod +x dist/.js β”‚ ready DTS generated in 2.19 s (cjs) └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm)ild && shx chmod +x dist/.js β”‚ File (esm) Size
└─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/
.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm)ild && shx chmod +x dist/.js [1 lines collapsed] β”‚ start Generating DTS... (esm) β”‚ start Generating DTS... (cjs) └─ Running... .../agent-infra/mcp-servers/filesystem prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf dist && rslib build && shx chmod +x dist/.js β”‚ Rslib v0.5.3 β”‚ ready built in 0.44 s (esm) β”‚ ready built in 0.47 s (cjs) β”‚ dist/index.mjs 6.2 kB(esm) └─ Running... .../agent-infra/mcp-servers/commands prepare$ npm run build β”‚ > @agent-infra/[email protected] build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm) └─ Done in 3.7s in 0.40 s (cjs) β”‚ ready built in 0.27 s (cjs)m) β”‚ start Generating DTS... (esm) β”‚ start Generating DTS... (cjs) β”‚ error Failed to emit declaration files. (esm)pm run build └─ Running... β”‚ error /private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/src/server.ts:166:26 - error TS2344: Type 'ZodObject<{ type: ZodLiteral<"object">; properties: ZodOptional<ZodObject<{}, "passthrough",… └─ Running... β”‚ Types of property '_parse' are incompatible.npm run buildS-desktop/packages/agent-infra/mcp-servers/filesystem/node_modules/zod/lib/ZodError").ZodError' is not assignable to type 'Zod.ZodError'. └─ Running... [1 lines collapsed] [21 lines collapsed] β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/filesystem/node_modules/zod/lib/ZodError").ZodError' is not assignable to type 'Zod.ZodError'. β”‚ Types of property 'issues' are incompatible. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/filesystem/node_modules/zod/lib/ZodError").ZodIssue[]' is not assignable to type 'Zod.ZodIssue[]'. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/filesystem/node_modules/zod/lib/ZodError").ZodIssue' is not assignable to type 'Zod.ZodIssue'. β”‚ Type 'ZodInvalidArgumentsIssue & { fatal?: boolean | undefined; message: string; }' is not assignable to type 'ZodIssue'. β”‚ error DTS generation failed β”‚ at handleDiagnosticsAndProcessFiles (file:///private/tmp/UI-TARS-desktop/node_modules/rsbuild-plugin-dts/dist/tsc.js:16:15) β”‚ at async emitDts (file:///private/tmp/UI-TARS-desktop/node_modules/rsbuild-plugin-dts/dist/tsc.js:115:13) β”‚ Type '(input: ParseInput) => ParseReturnType<objectOutputType<{ type: ZodLiteral<"object">; properties: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, obje… └─ Running... β”‚ > @agent-infra/[email protected] buildnpm run build β”‚ > shx rm -rf build && rslib build && shx chmod +x dist/.{js,cjs} β”‚ Rslib v0.5.3 β”‚ ready built in 0.51 s (esm) β”‚ ready built in 0.40 s (cjs) β”‚ start Generating DTS... (esm) β”‚ start Generating DTS... (cjs) β”‚ error Failed to emit declaration files. (esm) β”‚ error /private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/src/server.ts:166:26 - error TS2344: Type 'ZodObject<{ type: ZodLiteral<"object">; properties: ZodOptional<ZodObject<{}, "passthrough",… β”‚ Types of property '_parse' are incompatible. β”‚ Type '(input: ParseInput) => ParseReturnType<objectOutputType<{ type: ZodLiteral<"object">; properties: ZodOptional<ZodObject<{}, "passthrough", ZodTypeAny, objectOutputType<{}, ZodTypeAny, "passthrough">, obje… β”‚ Types of parameters 'input' and 'input' are incompatible.esktop/node_modules/rsbuild-plugin-dts/dist/dts.js:123:9) β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/node_modules/zod/lib/helpers/parseUtil").ParseInput' is not assignable to type 'Zod.ParseInput'. β”‚ The types of 'parent.common.issues' are incompatible between these types. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/node_modules/zod/lib/ZodError").ZodIssue[]' is not assignable to type 'Zod.ZodIssue[]'. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/node_modules/zod/lib/ZodError").ZodIssue' is not assignable to type 'Zod.ZodIssue'. β”‚ Type 'ZodInvalidUnionIssue & { fatal?: boolean | undefined; message: string; }' is not assignable to type 'ZodIssue'. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/node_modules/zod/lib/ZodError").ZodInvalidUnionIssue & { fatal?: boolean | undefined; message: string; }' is no… β”‚ Type 'ZodInvalidUnionIssue & { fatal?: boolean | undefined; message: string; }' is not assignable to type 'ZodInvalidUnionIssue'. β”‚ Types of property 'unionErrors' are incompatible. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-servers/commands/node_modules/zod/lib/ZodError").ZodError[]' is not assignable to type 'Zod.ZodError[]'. β”‚ Type 'import("/private/tmp/UI-TARS-desktop/packages/agent-infra/mcp-server

tyzamTsing avatar Apr 07 '25 05:04 tyzamTsing

@tyzamTsing Thanks for your report,but I re-clone this repo but cannot reproduce this issue:

git clone [email protected]:bytedance/UI-TARS-desktop.git
cd UI-TARS-desktop
pnpm install

Could you provide more informations?

ulivz avatar Apr 07 '25 07:04 ulivz

just test in Mac mini M2 16G copilot tell me to force use

     "overrides": {
      "zod": "3.21.4"
    }

in package.json and several modifications in tsconfig.json and other file, then it works. not just this alpha7 version,in pre version and adb tags,they show the same error related to zod, I'm not sure if there is something wrong with my dev environment.

tyzamTsing avatar Apr 08 '25 01:04 tyzamTsing