examples icon indicating copy to clipboard operation
examples copied to clipboard

Error: Build Starter personalization-builder-io

Open luctrate opened this issue 2 years ago • 3 comments

Just wanted to try out the builder-vercel starter. https://vercel.com/templates/next.js/personalization-builder-io

Following Error was thrown, during build stage:

[10:24:00.585] Failed to compile.
[10:24:00.585] 
[10:24:00.587] ./pages/_middleware.tsx:10:59
[10:24:00.587] Type error: Argument of type 'NextCookies' is not assignable to parameter of type 'Record<string, string>'.
[10:24:00.588]   Index signature for type 'string' is missing in type 'NextCookies'.
Full Build Log from Vercel [10:23:10.713] Running build in San Francisco, USA (West) – sfo1 [10:23:10.756] Cloning github.com/luctrate/personalization-test-builder (Branch: main, Commit: 994e176) [10:23:10.902] Previous build cache not available [10:23:11.823] Cloning completed: 1.067s [10:23:11.983] Running "vercel build" [10:23:12.559] Vercel CLI 28.15.3 [10:23:12.866] Installing dependencies... [10:23:13.255] yarn install v1.22.17 [10:23:13.305] info No lockfile found. [10:23:13.315] [1/4] Resolving packages... [10:23:15.138] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > [email protected]: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md [10:23:15.173] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > [email protected]: Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details [10:23:15.287] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > @types/[email protected]: This is a stub types definition. graphql provides its own type definitions, so you do not need this installed. [10:23:15.348] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > graphql-toolkit > [email protected]: GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes. [10:23:15.373] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > [email protected]: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead [10:23:15.464] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > graphql-tools > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [10:23:15.464] warning @builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > graphql-toolkit > @kamilkisiela/graphql-tools > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [10:23:16.066] warning @builder.io/react > create-react-context > fbjs > [email protected]: core-js@ jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin. [10:23:20.870] [2/4] Fetching packages... [10:23:45.670] [3/4] Linking dependencies... [10:23:45.673] warning " > @builder.io/[email protected]" has unmet peer dependency "@builder.io/sdk@^1.1.20". [10:23:45.673] warning " > @builder.io/[email protected]" has incorrect peer dependency "react@^16.14.0". [10:23:45.673] warning " > @builder.io/[email protected]" has incorrect peer dependency "react-dom@^16.14.0". [10:23:45.674] warning " > @builder.io/[email protected]" has incorrect peer dependency "next@^11.1.3-canary.88". [10:23:45.675] warning "@builder.io/personalization-utils > @builder.io/admin-sdk > graphql-typed-client > [email protected]" has unmet peer dependency "graphql-tag-pluck@^0.8.3". [10:23:45.676] warning "@builder.io/react > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0". [10:23:45.677] warning " > @vercel/[email protected]" has unmet peer dependency "@types/node-fetch@^2.6.1". [10:23:45.677] warning " > @vercel/[email protected]" has unmet peer dependency "node-fetch@^2.6.7". [10:23:45.677] warning "@vercel/fetch > @vercel/[email protected]" has unmet peer dependency "node-fetch@^2.6.1". [10:23:45.677] warning "@vercel/fetch > @vercel/[email protected]" has unmet peer dependency "node-fetch@^2.6.7". [10:23:55.406] [4/4] Building fresh packages... [10:23:55.491] success Saved lockfile. [10:23:55.498] Done in 42.25s. [10:23:55.540] Detected Next.js version: 12.3.4 [10:23:55.543] Running "yarn run build" [10:23:55.766] yarn run v1.22.17 [10:23:55.823] $ next build [10:23:56.414] Attention: Next.js now collects completely anonymous telemetry regarding usage. [10:23:56.415] This information is used to shape Next.js' roadmap and prioritize features. [10:23:56.415] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [10:23:56.415] https://nextjs.org/telemetry [10:23:56.415] [10:23:56.579] info - Linting and checking validity of types... [10:23:57.242] We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default. [10:23:57.243] [10:23:57.243] The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's needs: [10:23:57.243] [10:23:57.243] - incremental was set to true [10:23:57.244] [10:23:59.187] [10:23:59.188] ./pages/api/attributes.ts [10:23:59.188] 11:1 Warning: Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export [10:23:59.188] [10:23:59.188] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules [10:24:00.585] Failed to compile. [10:24:00.585] [10:24:00.587] ./pages/_middleware.tsx:10:59 [10:24:00.587] Type error: Argument of type 'NextCookies' is not assignable to parameter of type 'Record'. [10:24:00.588] Index signature for type 'string' is missing in type 'NextCookies'. [10:24:00.588] [10:24:00.588] [0m [90m 8 | [39m[0m [10:24:00.588] [0m [90m 9 | [39m [36mif[39m ([33m![39mexcludededPrefixes[33m.[39mfind((path) [33m=>[39m url[33m.[39mpathname[33m?[39m[33m.[39mstartsWith(path))) {[0m [10:24:00.588] [0m[31m[1m>[22m[39m[90m 10 | [39m [36mconst[39m rewrite [33m=[39m getPersonalizedRewrite(url[33m.[39mpathname[33m![39m[33m,[39m req[33m.[39mcookies)[0m [10:24:00.588] [0m [90m | [39m [31m[1m^[22m[39m[0m [10:24:00.588] [0m [90m 11 | [39m [36mif[39m (rewrite) {[0m [10:24:00.588] [0m [90m 12 | [39m url[33m.[39mpathname [33m=[39m rewrite[0m [10:24:00.588] [0m [90m 13 | [39m [36mreturn[39m [33mNextResponse[39m[33m.[39mrewrite(url)[0m [10:24:00.627] error Command failed with exit code 1. [10:24:00.628] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [10:24:00.655] Error: Command "yarn run build" exited with 1

luctrate avatar Feb 10 '23 09:02 luctrate

hi, did you find a solution for this? I had the same problem.

shuang807 avatar Apr 01 '23 20:04 shuang807

No, sadly not.

luctrate avatar May 01 '23 07:05 luctrate

Having the same problem. One click deploy for Vercel is broken.

rafarc21 avatar May 04 '23 13:05 rafarc21