Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catalyst-core:build fails to build for new project "turbo run build" exited with 1 #1942

Closed
GangGreenTemperTatum opened this issue Jan 29, 2025 · 3 comments

Comments

@GangGreenTemperTatum
Copy link

We really appreciate the help making Catalyst better. Every issue helps!

Describe the bug
README steps to setup a project fails on build

To Reproduce
Steps to reproduce the behavior:

  1. follow steps on vercel setup
  2. attach repo, create project
  3. add bigcommerce integration which triggers the build

Please link to a repo that can be used to reproduce this issue, if possible. It'll help fix the bug faster.

Expected behavior
a successful non-erroring build

Screenshots

[14:43:01.278] Running build in Washington, D.C., USA (East) – iad1
[14:43:01.407] Cloning github.com/GangGreenTemperTatum/my-catalyst-storefront (Branch: main, Commit: 0dfff10)
[14:43:01.982] Cloning completed: 575.000ms
[14:43:01.997] Previous build cache not available
[14:43:02.481] Running "vercel build"
[14:43:02.925] Vercel CLI 39.3.0
[14:43:03.040] > Detected Turbo. Adjusting default settings...
[14:43:03.421] Detected `pnpm-lock.yaml` version 9 generated by [email protected]
[14:43:03.426] Running "install" command: `pnpm install`...
[14:43:04.069] Scope: all 5 workspace projects
[14:43:04.285] ..                                       | Progress: resolved 1, reused 0, downloaded 0, added 0
[14:43:04.499] ..                                       |    +1020 ++++++++++++++++++++++++++++
[14:43:05.299] ..                                       | Progress: resolved 1020, reused 0, downloaded 55, added 51
[14:43:06.287] ..                                       | Progress: resolved 1020, reused 0, downloaded 114, added 103
[14:43:07.291] ..                                       | Progress: resolved 1020, reused 0, downloaded 124, added 113
[14:43:08.291] ..                                       | Progress: resolved 1020, reused 0, downloaded 140, added 124
[14:43:09.483] ..                                       | Progress: resolved 1020, reused 0, downloaded 140, added 125
[14:43:10.483] ..                                       | Progress: resolved 1020, reused 0, downloaded 188, added 177
[14:43:12.097] ..                                       | Progress: resolved 1020, reused 0, downloaded 189, added 177
[14:43:13.099] ..                                       | Progress: resolved 1020, reused 0, downloaded 202, added 188
[14:43:14.099] ..                                       | Progress: resolved 1020, reused 0, downloaded 203, added 188
[14:43:15.100] ..                                       | Progress: resolved 1020, reused 0, downloaded 204, added 188
[14:43:16.100] ..                                       | Progress: resolved 1020, reused 0, downloaded 219, added 203
[14:43:17.100] ..                                       | Progress: resolved 1020, reused 0, downloaded 223, added 208
[14:43:18.100] ..                                       | Progress: resolved 1020, reused 0, downloaded 252, added 239
[14:43:19.101] ..                                       | Progress: resolved 1020, reused 0, downloaded 267, added 252
[14:43:20.103] ..                                       | Progress: resolved 1020, reused 0, downloaded 283, added 267
[14:43:21.106] ..                                       | Progress: resolved 1020, reused 0, downloaded 370, added 361
[14:43:22.108] ..                                       | Progress: resolved 1020, reused 0, downloaded 475, added 459
[14:43:23.109] ..                                       | Progress: resolved 1020, reused 0, downloaded 585, added 571
[14:43:24.111] ..                                       | Progress: resolved 1020, reused 0, downloaded 742, added 736
[14:43:25.112] ..                                       | Progress: resolved 1020, reused 0, downloaded 845, added 840
[14:43:26.112] ..                                       | Progress: resolved 1020, reused 0, downloaded 947, added 933
[14:43:27.113] ..                                       | Progress: resolved 1020, reused 0, downloaded 1019, added 1019
[14:43:27.143] ..                                       | Progress: resolved 1020, reused 0, downloaded 1019, added 1020, done
[14:43:27.526] .../node_modules/@swc/core postinstall$ node postinstall.js
[14:43:27.548] .../node_modules/msw postinstall$ node -e "try{require('./config/scripts/postinstall')}catch(e){}"
[14:43:27.550] .../[email protected]/node_modules/sharp install$ node install/check
[14:43:27.551] .../[email protected]/node_modules/esbuild postinstall$ node install.js
[14:43:27.673] .../node_modules/@swc/core postinstall: Done
[14:43:27.680] .../node_modules/msw postinstall: Done
[14:43:28.502] .../[email protected]/node_modules/esbuild postinstall: Done
[14:43:28.655] .../[email protected]/node_modules/sharp install: Done
[14:43:28.678] .../node_modules/@vercel/speed-insights postinstall$ node scripts/postinstall.mjs
[14:43:28.729] .../node_modules/@vercel/speed-insights postinstall: Done
[14:43:29.043] 
[14:43:29.043] dependencies:
[14:43:29.043] + @bigcommerce/catalyst-client 0.14.0 <- ../packages/client
[14:43:29.043] + @conform-to/react 1.2.2
[14:43:29.043] + @conform-to/zod 1.2.2
[14:43:29.043] + @icons-pack/react-simple-icons 11.2.0
[14:43:29.044] + @radix-ui/react-accordion 1.2.2
[14:43:29.044] + @radix-ui/react-alert-dialog 1.1.5
[14:43:29.044] + @radix-ui/react-checkbox 1.1.3
[14:43:29.044] + @radix-ui/react-dialog 1.1.5
[14:43:29.044] + @radix-ui/react-dropdown-menu 2.1.5
[14:43:29.044] + @radix-ui/react-form 0.1.1
[14:43:29.044] + @radix-ui/react-label 2.1.1
[14:43:29.044] + @radix-ui/react-navigation-menu 1.2.4
[14:43:29.044] + @radix-ui/react-popover 1.1.5
[14:43:29.045] + @radix-ui/react-portal 1.1.3
[14:43:29.045] + @radix-ui/react-radio-group 1.2.2
[14:43:29.045] + @radix-ui/react-select 2.1.5
[14:43:29.045] + @radix-ui/react-slot 1.1.1
[14:43:29.045] + @radix-ui/react-tabs 1.1.2
[14:43:29.045] + @radix-ui/react-toggle-group 1.1.1
[14:43:29.045] + @upstash/redis 1.34.3
[14:43:29.045] + @vercel/analytics 1.4.1
[14:43:29.045] + @vercel/kv 3.0.0
[14:43:29.045] + @vercel/speed-insights 1.1.0
[14:43:29.045] + class-variance-authority 0.7.1
[14:43:29.046] + clsx 2.1.1
[14:43:29.046] + content-security-policy-builder 2.2.0
[14:43:29.046] + deepmerge 4.3.1
[14:43:29.046] + embla-carousel 8.5.2
[14:43:29.046] + embla-carousel-autoplay 8.5.2
[14:43:29.046] + embla-carousel-fade 8.5.2
[14:43:29.046] + embla-carousel-react 8.5.2
[14:43:29.046] + focus-trap-react 11.0.3
[14:43:29.047] + gql.tada 1.8.10
[14:43:29.047] + graphql 16.10.0
[14:43:29.047] + jose 5.9.6
[14:43:29.047] + lodash.debounce 4.0.8
[14:43:29.048] + lru-cache 11.0.2
[14:43:29.048] + lucide-react 0.474.0
[14:43:29.048] + next 15.2.0-canary.27
[14:43:29.049] + next-auth 5.0.0-beta.25
[14:43:29.049] + next-intl 3.26.3
[14:43:29.049] + nuqs 2.3.1
[14:43:29.049] + p-lazy 5.0.0
[14:43:29.050] + react 19.0.0
[14:43:29.050] + react-day-picker 9.5.1
[14:43:29.050] + react-dom 19.0.0
[14:43:29.051] + react-google-recaptcha 3.1.0
[14:43:29.051] + react-headroom 3.2.1
[14:43:29.051] + react-hook-form 7.54.2
[14:43:29.051] + react-hot-toast 2.5.1
[14:43:29.051] + schema-dts 1.1.2
[14:43:29.052] + server-only 0.0.1
[14:43:29.052] + sharp 0.33.5
[14:43:29.052] + sonner 1.7.2
[14:43:29.052] + tailwind-merge 2.6.0
[14:43:29.052] + tailwindcss-radix 3.0.5
[14:43:29.052] + uuid 11.0.5
[14:43:29.052] + zod 3.24.1
[14:43:29.052] 
[14:43:29.052] devDependencies:
[14:43:29.053] + @0no-co/graphqlsp 1.12.16
[14:43:29.053] + @bigcommerce/eslint-config-catalyst 0.1.3 <- ../packages/eslint-config-catalyst
[14:43:29.053] + @faker-js/faker 9.4.0
[14:43:29.053] + @gql.tada/cli-utils 1.6.3
[14:43:29.053] + @next/bundle-analyzer 15.1.6
[14:43:29.053] + @playwright/test 1.50.0
[14:43:29.053] + @tailwindcss/container-queries 0.1.1
[14:43:29.053] + @types/gtag.js 0.0.20
[14:43:29.053] + @types/lodash.debounce 4.0.9
[14:43:29.053] + @types/node 20.17.16
[14:43:29.053] + @types/react 19.0.8
[14:43:29.054] + @types/react-dom 19.0.3
[14:43:29.054] + @types/react-google-recaptcha 2.1.9
[14:43:29.054] + @types/react-headroom 3.2.3
[14:43:29.054] + @types/uuid 10.0.0
[14:43:29.054] + autoprefixer 10.4.20
[14:43:29.054] + dotenv 16.4.7
[14:43:29.054] + dotenv-cli 8.0.0
[14:43:29.054] + eslint 8.57.1
[14:43:29.054] + eslint-config-next 15.1.6
[14:43:29.054] + postcss 8.5.1
[14:43:29.054] + prettier 3.4.2
[14:43:29.055] + prettier-plugin-tailwindcss 0.6.11
[14:43:29.055] + tailwindcss 3.4.17
[14:43:29.055] + tailwindcss-animate 1.0.7
[14:43:29.055] + typescript 5.7.3
[14:43:29.055] 
[14:43:29.106] Done in 25.5s
[14:43:29.155] Detected Next.js version: 15.2.0-canary.27
[14:43:29.156] Running "turbo run build"
[14:43:29.392] 
[14:43:29.393] Attention:
[14:43:29.393] Turborepo now collects completely anonymous telemetry regarding usage.
[14:43:29.394] This information is used to shape the Turborepo roadmap and prioritize features.
[14:43:29.394] 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:
[14:43:29.395] https://turbo.build/repo/docs/telemetry
[14:43:29.395] 
[14:43:29.449] • Packages in scope: @bigcommerce/catalyst-core
[14:43:29.450] • Running build in 1 packages
[14:43:29.450] • Remote caching enabled
[14:43:29.628] @bigcommerce/catalyst-client:build: cache miss, executing 3d404f814aa06587
[14:43:30.118] @bigcommerce/catalyst-client:build: 
[14:43:30.119] @bigcommerce/catalyst-client:build: > @bigcommerce/[email protected] build /vercel/path0/packages/client
[14:43:30.119] @bigcommerce/catalyst-client:build: > tsup
[14:43:30.119] @bigcommerce/catalyst-client:build: 
[14:43:30.586] @bigcommerce/catalyst-client:build: �[34mCLI�[39m Building entry: src/index.ts
[14:43:30.587] @bigcommerce/catalyst-client:build: �[34mCLI�[39m Using tsconfig: tsconfig.json
[14:43:30.588] @bigcommerce/catalyst-client:build: �[34mCLI�[39m tsup v8.3.6
[14:43:30.589] @bigcommerce/catalyst-client:build: �[34mCLI�[39m Using tsup config: /vercel/path0/packages/client/tsup.config.ts
[14:43:30.596] @bigcommerce/catalyst-client:build: �[34mCLI�[39m Target: node16
[14:43:30.601] @bigcommerce/catalyst-client:build: �[34mCLI�[39m Cleaning output folder
[14:43:30.603] @bigcommerce/catalyst-client:build: �[34mCJS�[39m Build start
[14:43:30.629] @bigcommerce/catalyst-client:build: �[32mCJS�[39m �[1mdist/index.js �[22m�[32m10.05 KB�[39m
[14:43:30.630] @bigcommerce/catalyst-client:build: �[32mCJS�[39m ⚡️ Build success in 25ms
[14:43:30.967] @bigcommerce/catalyst-client:build: �[34mDTS�[39m Build start
[14:43:32.949] @bigcommerce/catalyst-client:build: �[32mDTS�[39m ⚡️ Build success in 1982ms
[14:43:32.950] @bigcommerce/catalyst-client:build: �[32mDTS�[39m �[1mdist/index.d.ts �[22m�[32m3.18 KB�[39m
[14:43:32.992]  WARNING  signing artifact failed: signature secret key not found. You must specify a secret key in the TURBO_REMOTE_CACHE_SIGNATURE_KEY environment variable
[14:43:33.087] @bigcommerce/catalyst-core:build: cache miss, executing 47ee5d17974aa4e3
[14:43:33.581] @bigcommerce/catalyst-core:build: 
[14:43:33.581] @bigcommerce/catalyst-core:build: > @bigcommerce/[email protected] build /vercel/path0/core
[14:43:33.582] @bigcommerce/catalyst-core:build: > npm run generate && next build
[14:43:33.582] @bigcommerce/catalyst-core:build: 
[14:43:33.777] @bigcommerce/catalyst-core:build: 
[14:43:33.777] @bigcommerce/catalyst-core:build: > @bigcommerce/[email protected] generate
[14:43:33.777] @bigcommerce/catalyst-core:build: > dotenv -e .env.local -- node ./scripts/generate.cjs
[14:43:33.777] @bigcommerce/catalyst-core:build: 
[14:43:34.217] @bigcommerce/catalyst-core:build: Error: Missing storefront token
[14:43:34.218] @bigcommerce/catalyst-core:build:     at getToken (/vercel/path0/core/scripts/generate.cjs:27:11)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at generate (/vercel/path0/core/scripts/generate.cjs:50:43)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at Object.<anonymous> (/vercel/path0/core/scripts/generate.cjs:67:1)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at Module._compile (node:internal/modules/cjs/loader:1562:14)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at Object..js (node:internal/modules/cjs/loader:1699:10)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at Module.load (node:internal/modules/cjs/loader:1313:32)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at Function._load (node:internal/modules/cjs/loader:1123:12)
[14:43:34.218] @bigcommerce/catalyst-core:build:     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
[14:43:34.219] @bigcommerce/catalyst-core:build:     at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
[14:43:34.219] @bigcommerce/catalyst-core:build:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
[14:43:34.244] @bigcommerce/catalyst-core:build:  ELIFECYCLE  Command failed with exit code 1.
[14:43:34.259] @bigcommerce/catalyst-core:build: ERROR: command finished with error: command (/vercel/path0/core) /pnpm9/node_modules/.bin/pnpm run build exited (1)
[14:43:34.259] @bigcommerce/catalyst-core#build: command (/vercel/path0/core) /pnpm9/node_modules/.bin/pnpm run build exited (1)
[14:43:34.262] 
[14:43:34.262]   Tasks:    1 successful, 2 total
[14:43:34.262]  Cached:    0 cached, 2 total
[14:43:34.263]    Time:    4.859s 
[14:43:34.263] Summary:    /vercel/path0/.turbo/runs/2sJhvLcYb2LQ7XyaxVUd0odPojI.json
[14:43:34.263]  Failed:    @bigcommerce/catalyst-core#build
[14:43:34.263] 
[14:43:34.267]  ERROR  run failed: command  exited (1)
[14:43:34.279] Error: Command "turbo run build" exited with 1
[14:43:34.785] 

Additional context
Add any other context about the problem here.

@bookernath
Copy link
Contributor

This means you don't have a BIGCOMMERCE_STOREFRONT_TOKEN specified on vercel. If you have one in .env.local, you can push it up to Vercel to fix the build.

Vercel makes it really easy to copy your entire .env.local to clipboard and paste it into their environment variables in the UI, I'd do that... but you can also do it manually or with CLI:

https://vercel.com/docs/cli/env

@michaelmerrill
Copy link

If a user uses the "Deploy" on Vercel button, Vercel uses BIGCOMMERCE_CUSTOMER_IMPERSONATION_TOKEN instead of BIGCOMMERCE_STOREFRONT_TOKEN. You can change the environment variable key in the Vercel project settings and redeploy successfully.

However, I'm still seeing a 503 for my successful deploy. Any help would be appreciated!

@migueloller
Copy link
Collaborator

Going to close this one so we can track progress in one place (#1948)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants