Closed jwalsh-vori closed 1 month ago
Describe the bug
Unable to start typebot using pnpm run dev. Error is 'TS2589: Type instantiation is excessively deep'
pnpm run dev
Appears to be an issue with ' ../../forge/blocks/openai/shared/runGenerateVariables.ts (40:28)'
Tried updating line 40 to cast the schema type: const { object } = await generateObject<z.infer>({
This did not resolve the issue.
node version: v22.4.1 pnpm version: 8.15.8 Macbook Air M2 MacOS: Sonoma 14.5
To Reproduce Steps to reproduce the behavior:
@typebot.io/js:build: @typebot.io/js:build: > @typebot.io/js@0.3.11 build /Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js @typebot.io/js:build: > rollup --config rollup.config.js @typebot.io/js:build: @typebot.io/js:build: @typebot.io/js:build: ./src/index.ts → dist/index.js... @typebot.io/js:build: [!] (plugin typescript) RollupError: @rollup/plugin-typescript TS2589: Type instantiation is excessively deep and possibly infinite. @typebot.io/js:build: ../../forge/blocks/openai/shared/runGenerateVariables.ts (40:28) @typebot.io/js:build: @typebot.io/js:build: 40 const { object } = await generateObject({ @typebot.io/js:build: ~~~~~~~~~~~~~~~~ @typebot.io/js:build: 41 model, @typebot.io/js:build: ~~~~~~~~~~ @typebot.io/js:build: ... @typebot.io/js:build: 47 : '.'), @typebot.io/js:build: ~~~~~~~~~~~~~~~ @typebot.io/js:build: 48 }) @typebot.io/js:build: ~~~~ @typebot.io/js:build: @typebot.io/js:build: at error (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/shared/rollup.js:349:30) @typebot.io/js:build: at Object.error (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/shared/rollup.js:1715:20) @typebot.io/js:build: at emitDiagnostic (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:521:17) @typebot.io/js:build: at reportDiagnostics (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:529:9) @typebot.io/js:build: at Array.forEach (<anonymous>) @typebot.io/js:build: at emitFilesAndReportErrors (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127124:17) @typebot.io/js:build: at Object.result.afterProgramCreate (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127283:7) @typebot.io/js:build: at Object.afterProgramCreate (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:686:29) @typebot.io/js:build: at synchronizeProgram (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127652:14) @typebot.io/js:build: at Object.createWatchProgram (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127553:5) @typebot.io/js:build: @typebot.io/js:build: @typebot.io/js:build: ELIFECYCLE Command failed with exit code 1. @typebot.io/js:build: ERROR: command finished with error: command (/Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js) /opt/homebrew/opt/pnpm@8/bin/pnpm run build exited (1) @typebot.io/js#build: command (/Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js) /opt/homebrew/opt/pnpm@8/bin/pnpm run build exited (1)
Expected behavior Typebot should start with no error
Screen recording If applicable, add a screen recording or screenshots to help explain your problem.
that worked, thank you!
i can not find index.js file to start appli in local,please advice thanks
Describe the bug
Unable to start typebot using
pnpm run dev
. Error is 'TS2589: Type instantiation is excessively deep'Appears to be an issue with ' ../../forge/blocks/openai/shared/runGenerateVariables.ts (40:28)'
Tried updating line 40 to cast the schema type: const { object } = await generateObject<z.infer>({
This did not resolve the issue.
node version: v22.4.1 pnpm version: 8.15.8 Macbook Air M2 MacOS: Sonoma 14.5
To Reproduce Steps to reproduce the behavior:
pnpm run dev
.@typebot.io/js:build: @typebot.io/js:build: > @typebot.io/js@0.3.11 build /Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js @typebot.io/js:build: > rollup --config rollup.config.js @typebot.io/js:build: @typebot.io/js:build: @typebot.io/js:build: ./src/index.ts → dist/index.js... @typebot.io/js:build: [!] (plugin typescript) RollupError: @rollup/plugin-typescript TS2589: Type instantiation is excessively deep and possibly infinite. @typebot.io/js:build: ../../forge/blocks/openai/shared/runGenerateVariables.ts (40:28) @typebot.io/js:build: @typebot.io/js:build: 40 const { object } = await generateObject({ @typebot.io/js:build: ~~~~~~~~~~~~~~~~ @typebot.io/js:build: 41 model, @typebot.io/js:build: ~~~~~~~~~~ @typebot.io/js:build: ... @typebot.io/js:build: 47 : '.'), @typebot.io/js:build: ~~~~~~~~~~~~~~~ @typebot.io/js:build: 48 }) @typebot.io/js:build: ~~~~ @typebot.io/js:build: @typebot.io/js:build: at error (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/shared/rollup.js:349:30) @typebot.io/js:build: at Object.error (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/shared/rollup.js:1715:20) @typebot.io/js:build: at emitDiagnostic (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:521:17) @typebot.io/js:build: at reportDiagnostics (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:529:9) @typebot.io/js:build: at Array.forEach (<anonymous>) @typebot.io/js:build: at emitFilesAndReportErrors (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127124:17) @typebot.io/js:build: at Object.result.afterProgramCreate (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127283:7) @typebot.io/js:build: at Object.afterProgramCreate (file:///Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/@rollup+plugin-typescript@11.1.2_rollup@3.26.2_tslib@2.6.0_typescript@5.4.5/node_modules/@rollup/plugin-typescript/dist/es/index.js:686:29) @typebot.io/js:build: at synchronizeProgram (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127652:14) @typebot.io/js:build: at Object.createWatchProgram (/Users/jwalsh/development/typebot/branches/slider/typebot.io/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/typescript.js:127553:5) @typebot.io/js:build: @typebot.io/js:build: @typebot.io/js:build: ELIFECYCLE Command failed with exit code 1. @typebot.io/js:build: ERROR: command finished with error: command (/Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js) /opt/homebrew/opt/pnpm@8/bin/pnpm run build exited (1) @typebot.io/js#build: command (/Users/jwalsh/development/typebot/branches/slider/typebot.io/packages/embeds/js) /opt/homebrew/opt/pnpm@8/bin/pnpm run build exited (1)
Expected behavior Typebot should start with no error
Screen recording If applicable, add a screen recording or screenshots to help explain your problem.